mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:48:26 +00:00
fix EmojiLRU concurrency exception
// FREEBIE
This commit is contained in:
parent
239a11bfd2
commit
306c127803
@ -332,11 +332,12 @@ public class Emoji {
|
|||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final LinkedHashSet<String> latestRecentlyUsed = new LinkedHashSet<String>(recentlyUsed);
|
||||||
new AsyncTask<Void, Void, Void>() {
|
new AsyncTask<Void, Void, Void>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... params) {
|
protected Void doInBackground(Void... params) {
|
||||||
String serialized = new Gson().toJson(recentlyUsed);
|
String serialized = new Gson().toJson(latestRecentlyUsed);
|
||||||
prefs.edit()
|
prefs.edit()
|
||||||
.putString(EMOJI_LRU_PREFERENCE, serialized)
|
.putString(EMOJI_LRU_PREFERENCE, serialized)
|
||||||
.apply();
|
.apply();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user