2021-06-27 20:44:35 +00:00
package com.discord.stores ;
import a0.a.a.b ;
import android.content.Context ;
import c.d.b.a.a ;
import com.discord.models.domain.Model ;
import com.discord.models.domain.emoji.Emoji ;
import com.discord.models.domain.emoji.EmojiCategory ;
import com.discord.models.domain.emoji.EmojiSet ;
import com.discord.models.domain.emoji.ModelEmojiCustom ;
import com.discord.models.domain.emoji.ModelEmojiUnicode ;
import com.discord.stores.StoreMediaFavorites ;
import com.discord.utilities.collections.ShallowPartitionMap ;
import com.discord.utilities.frecency.FrecencyTracker ;
import com.discord.utilities.media.MediaFrecencyTracker ;
import com.discord.utilities.persister.Persister ;
import com.discord.utilities.textprocessing.Rules ;
import d0.f0.q ;
import d0.t.n ;
import d0.t.u ;
import d0.z.d.m ;
import j0.l.e.j ;
import java.io.InputStreamReader ;
import java.util.ArrayList ;
import java.util.Collection ;
import java.util.HashMap ;
import java.util.Iterator ;
import java.util.List ;
import java.util.Map ;
import java.util.Set ;
import java.util.regex.Pattern ;
import kotlin.jvm.internal.DefaultConstructorMarker ;
import rx.Observable ;
/* compiled from: StoreEmoji.kt */
public final class StoreEmoji implements Rules . EmojiDataProvider {
public static final Companion Companion = new Companion ( null ) ;
private static final String [ ] DEFAULT_FREQUENT_EMOJIS = { " bread " , " fork_and_knife " , " yum " , " weary " , " tired_face " , " poop " , " thumbsup " , " 100 " } ;
private static final int MAX_FREQUENTLY_USED_EMOJIS = 40 ;
private final StoreEmojiCustom customEmojiStore ;
private final MediaFrecencyTracker frecency ;
private final Persister < MediaFrecencyTracker > frecencyCache ;
private final StoreMediaFavorites mediaFavoritesStore ;
private final StorePermissions permissionsStore ;
private final StoreGuildsSorted sortedGuildsStore ;
private Map < String , ? extends ModelEmojiUnicode > unicodeEmojiSurrogateMap ;
private Map < EmojiCategory , ? extends List < ? extends Emoji > > unicodeEmojis ;
private Map < String , ? extends ModelEmojiUnicode > unicodeEmojisNamesMap ;
private Pattern unicodeEmojisPattern ;
private final StoreUser userStore ;
/* compiled from: StoreEmoji.kt */
public static final class Companion {
private Companion ( ) {
}
public /* synthetic */ Companion ( DefaultConstructorMarker defaultConstructorMarker ) {
this ( ) ;
}
public final String [ ] getDEFAULT_FREQUENT_EMOJIS ( ) {
return StoreEmoji . access$getDEFAULT_FREQUENT_EMOJIS$cp ( ) ;
}
}
/* compiled from: StoreEmoji.kt */
public static abstract class EmojiContext {
/* compiled from: StoreEmoji.kt */
public static final class Chat extends EmojiContext {
private final long channelId ;
private final long guildId ;
public Chat ( long j , long j2 ) {
super ( null ) ;
this . guildId = j ;
this . channelId = j2 ;
}
public static /* synthetic */ Chat copy$default ( Chat chat , long j , long j2 , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = chat . guildId ;
}
if ( ( i & 2 ) ! = 0 ) {
j2 = chat . channelId ;
}
return chat . copy ( j , j2 ) ;
}
public final long component1 ( ) {
return this . guildId ;
}
public final long component2 ( ) {
return this . channelId ;
}
public final Chat copy ( long j , long j2 ) {
return new Chat ( j , j2 ) ;
}
public boolean equals ( Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( ! ( obj instanceof Chat ) ) {
return false ;
}
Chat chat = ( Chat ) obj ;
return this . guildId = = chat . guildId & & this . channelId = = chat . channelId ;
}
public final long getChannelId ( ) {
return this . channelId ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public int hashCode ( ) {
return b . a ( this . channelId ) + ( b . a ( this . guildId ) * 31 ) ;
}
public String toString ( ) {
StringBuilder L = a . L ( " Chat(guildId= " ) ;
L . append ( this . guildId ) ;
L . append ( " , channelId= " ) ;
return a . A ( L , this . channelId , " ) " ) ;
}
}
/* compiled from: StoreEmoji.kt */
public static final class Global extends EmojiContext {
public static final Global INSTANCE = new Global ( ) ;
private Global ( ) {
super ( null ) ;
}
}
/* compiled from: StoreEmoji.kt */
public static final class GuildProfile extends EmojiContext {
private final long guildId ;
public GuildProfile ( long j ) {
super ( null ) ;
this . guildId = j ;
}
public static /* synthetic */ GuildProfile copy$default ( GuildProfile guildProfile , long j , int i , Object obj ) {
if ( ( i & 1 ) ! = 0 ) {
j = guildProfile . guildId ;
}
return guildProfile . copy ( j ) ;
}
public final long component1 ( ) {
return this . guildId ;
}
public final GuildProfile copy ( long j ) {
return new GuildProfile ( j ) ;
}
public boolean equals ( Object obj ) {
if ( this ! = obj ) {
return ( obj instanceof GuildProfile ) & & this . guildId = = ( ( GuildProfile ) obj ) . guildId ;
}
return true ;
}
public final long getGuildId ( ) {
return this . guildId ;
}
public int hashCode ( ) {
return b . a ( this . guildId ) ;
}
public String toString ( ) {
return a . A ( a . L ( " GuildProfile(guildId= " ) , this . guildId , " ) " ) ;
}
}
private EmojiContext ( ) {
}
public /* synthetic */ EmojiContext ( DefaultConstructorMarker defaultConstructorMarker ) {
this ( ) ;
}
}
public StoreEmoji ( StoreEmojiCustom storeEmojiCustom , StoreUser storeUser , StorePermissions storePermissions , StoreGuildsSorted storeGuildsSorted , StoreMediaFavorites storeMediaFavorites ) {
m . checkNotNullParameter ( storeEmojiCustom , " customEmojiStore " ) ;
m . checkNotNullParameter ( storeUser , " userStore " ) ;
m . checkNotNullParameter ( storePermissions , " permissionsStore " ) ;
m . checkNotNullParameter ( storeGuildsSorted , " sortedGuildsStore " ) ;
m . checkNotNullParameter ( storeMediaFavorites , " mediaFavoritesStore " ) ;
this . customEmojiStore = storeEmojiCustom ;
this . userStore = storeUser ;
this . permissionsStore = storePermissions ;
this . sortedGuildsStore = storeGuildsSorted ;
this . mediaFavoritesStore = storeMediaFavorites ;
2021-07-04 15:26:29 +00:00
Persister < MediaFrecencyTracker > persister = new Persister < > ( " EMOJI_HISTORY_V4 " , new MediaFrecencyTracker ( 0 , 0 , 3 , null ) ) ;
2021-06-27 20:44:35 +00:00
this . frecencyCache = persister ;
this . frecency = persister . get ( ) ;
}
public static final /* synthetic */ EmojiSet access$buildUsableEmojiSet ( StoreEmoji storeEmoji , Map map , EmojiContext emojiContext , List list , boolean z2 , boolean z3 , boolean z4 , boolean z5 , Set set ) {
return storeEmoji . buildUsableEmojiSet ( map , emojiContext , list , z2 , z3 , z4 , z5 , set ) ;
}
public static final /* synthetic */ StoreEmojiCustom access$getCustomEmojiStore$p ( StoreEmoji storeEmoji ) {
return storeEmoji . customEmojiStore ;
}
public static final /* synthetic */ String [ ] access$getDEFAULT_FREQUENT_EMOJIS$cp ( ) {
return DEFAULT_FREQUENT_EMOJIS ;
}
private final EmojiSet buildUsableEmojiSet ( Map < Long , ? extends Map < Long , ? extends ModelEmojiCustom > > map , EmojiContext emojiContext , List < Long > list , boolean z2 , boolean z3 , boolean z4 , boolean z5 , Set < ? extends StoreMediaFavorites . Favorite > set ) {
StoreEmoji$buildUsableEmojiSet$1 storeEmoji$buildUsableEmojiSet$1 = new StoreEmoji$buildUsableEmojiSet$1 ( emojiContext ) ;
StoreEmoji$buildUsableEmojiSet$2 storeEmoji$buildUsableEmojiSet$2 = new StoreEmoji$buildUsableEmojiSet$2 ( z5 , emojiContext ) ;
Set < Long > keySet = map . keySet ( ) ;
ArrayList < Number > arrayList = new ArrayList ( ) ;
for ( Object obj : keySet ) {
if ( ! list . contains ( Long . valueOf ( ( ( Number ) obj ) . longValue ( ) ) ) ) {
arrayList . add ( obj ) ;
}
}
int size = list . size ( ) + arrayList . size ( ) ;
int i = 0 ;
for ( List < Number > list2 : n . listOf ( ( Object [ ] ) new List [ ] { list , arrayList } ) ) {
int i2 = 0 ;
for ( Number number : list2 ) {
long longValue = number . longValue ( ) ;
Map map2 = ( Map ) map . get ( Long . valueOf ( longValue ) ) ;
i2 + = ( map2 = = null | | storeEmoji$buildUsableEmojiSet$2 . invoke ( storeEmoji$buildUsableEmojiSet$1 . invoke ( longValue ) ) ) ? 0 : map2 . size ( ) ;
}
i + = i2 ;
}
Map < String , ? extends ModelEmojiUnicode > map3 = this . unicodeEmojisNamesMap ;
if ( map3 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojisNamesMap " ) ;
}
int size2 = map3 . size ( ) ;
Map < EmojiCategory , ? extends List < ? extends Emoji > > map4 = this . unicodeEmojis ;
if ( map4 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojis " ) ;
}
Iterator < T > it = map4 . values ( ) . iterator ( ) ;
int i3 = 0 ;
while ( it . hasNext ( ) ) {
i3 + = ( ( List ) it . next ( ) ) . size ( ) ;
}
ShallowPartitionMap . Companion companion = ShallowPartitionMap . Companion ;
ShallowPartitionMap create$default = ShallowPartitionMap . Companion . create$default ( companion , i + size2 , 0 , 0 , null , 14 , null ) ;
HashMap hashMap = new HashMap ( size ) ;
ShallowPartitionMap create$default2 = ShallowPartitionMap . Companion . create$default ( companion , i + i3 , 0 , 0 , null , 14 , null ) ;
if ( ! ( emojiContext instanceof EmojiContext . GuildProfile ) ) {
Map < EmojiCategory , ? extends List < ? extends Emoji > > map5 = this . unicodeEmojis ;
if ( map5 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojis " ) ;
}
Iterator < T > it2 = map5 . values ( ) . iterator ( ) ;
while ( it2 . hasNext ( ) ) {
for ( Emoji emoji : ( List ) it2 . next ( ) ) {
String uniqueId = emoji . getUniqueId ( ) ;
m . checkNotNullExpressionValue ( uniqueId , " emoji.uniqueId " ) ;
create$default2 . put ( uniqueId , emoji ) ;
}
}
}
StoreEmoji$buildUsableEmojiSet$4 storeEmoji$buildUsableEmojiSet$4 = StoreEmoji$buildUsableEmojiSet$4 . INSTANCE ;
ShallowPartitionMap shallowPartitionMap = create$default2 ;
StoreEmoji$buildUsableEmojiSet$5 storeEmoji$buildUsableEmojiSet$5 = new StoreEmoji$buildUsableEmojiSet$5 ( map , storeEmoji$buildUsableEmojiSet$1 , storeEmoji$buildUsableEmojiSet$2 , z4 , emojiContext , z2 , z3 , create$default , shallowPartitionMap , hashMap ) ;
Map < String , ? extends ModelEmojiUnicode > map6 = this . unicodeEmojisNamesMap ;
if ( map6 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojisNamesMap " ) ;
}
for ( String str : map6 . keySet ( ) ) {
StoreEmoji$buildUsableEmojiSet$4 . INSTANCE . invoke ( ( Map < ShallowPartitionMap , Integer > ) create$default , ( ShallowPartitionMap ) str ) ;
}
long guildId = emojiContext instanceof EmojiContext . Chat ? ( ( EmojiContext . Chat ) emojiContext ) . getGuildId ( ) : 0 ;
storeEmoji$buildUsableEmojiSet$5 . invoke ( guildId ) ;
ArrayList < Number > arrayList2 = new ArrayList ( ) ;
for ( Object obj2 : list ) {
if ( ( ( Number ) obj2 ) . longValue ( ) ! = guildId ) {
arrayList2 . add ( obj2 ) ;
}
}
for ( Number number2 : arrayList2 ) {
storeEmoji$buildUsableEmojiSet$5 . invoke ( number2 . longValue ( ) ) ;
}
for ( Number number3 : arrayList ) {
storeEmoji$buildUsableEmojiSet$5 . invoke ( number3 . longValue ( ) ) ;
}
ArrayList < StoreMediaFavorites . FavoriteEmoji > arrayList3 = new ArrayList ( ) ;
for ( Object obj3 : set ) {
if ( obj3 instanceof StoreMediaFavorites . FavoriteEmoji ) {
arrayList3 . add ( obj3 ) ;
}
}
ArrayList arrayList4 = new ArrayList ( ) ;
for ( StoreMediaFavorites . FavoriteEmoji favoriteEmoji : arrayList3 ) {
Emoji emoji2 = ( Emoji ) shallowPartitionMap . get ( favoriteEmoji . getEmojiUniqueId ( ) ) ;
if ( emoji2 ! = null ) {
arrayList4 . add ( emoji2 ) ;
}
shallowPartitionMap = shallowPartitionMap ;
}
Set set2 = u . toSet ( arrayList4 ) ;
Map < EmojiCategory , ? extends List < ? extends Emoji > > map7 = this . unicodeEmojis ;
if ( map7 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojis " ) ;
}
return new EmojiSet ( map7 , hashMap , shallowPartitionMap , getFrequentlyUsedEmojis ( shallowPartitionMap ) , set2 ) ;
}
private final Pattern compileSurrogatesPattern ( ) {
Map < String , ? extends ModelEmojiUnicode > map = this . unicodeEmojiSurrogateMap ;
if ( map = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojiSurrogateMap " ) ;
}
Pattern compile = Pattern . compile ( u . joinToString$default ( u . sortedWith ( map . keySet ( ) , new StoreEmoji$compileSurrogatesPattern$$inlined$sortedBy$1 ( ) ) , " | " , null , null , 0 , null , StoreEmoji$compileSurrogatesPattern$emojiSurrogatesPattern$2 . INSTANCE , 30 , null ) ) ;
m . checkNotNullExpressionValue ( compile , " Pattern.compile(emojiSurrogatesPattern) " ) ;
return compile ;
}
public static /* synthetic */ Observable getEmojiSet$default ( StoreEmoji storeEmoji , long j , long j2 , boolean z2 , boolean z3 , int i , Object obj ) {
return storeEmoji . getEmojiSet ( j , j2 , ( i & 4 ) ! = 0 ? false : z2 , ( i & 8 ) ! = 0 ? false : z3 ) ;
}
private final List < Emoji > getFrequentlyUsedEmojis ( Map < String , ? extends Emoji > map ) {
Collection < String > sortedKeys$default = FrecencyTracker . getSortedKeys$default ( this . frecency , 0 , 1 , null ) ;
ArrayList arrayList = new ArrayList ( ) ;
for ( String str : sortedKeys$default ) {
Emoji emoji = ( Emoji ) map . get ( str ) ;
if ( emoji ! = null ) {
arrayList . add ( emoji ) ;
}
}
List < Emoji > take = u . take ( arrayList , 40 ) ;
if ( take . size ( ) > = 40 ) {
return take ;
}
String [ ] strArr = DEFAULT_FREQUENT_EMOJIS ;
ArrayList arrayList2 = new ArrayList ( ) ;
for ( String str2 : strArr ) {
Map < String , ? extends ModelEmojiUnicode > map2 = this . unicodeEmojisNamesMap ;
if ( map2 = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojisNamesMap " ) ;
}
ModelEmojiUnicode modelEmojiUnicode = ( ModelEmojiUnicode ) map2 . get ( str2 ) ;
if ( modelEmojiUnicode ! = null ) {
arrayList2 . add ( modelEmojiUnicode ) ;
}
}
return u . distinct ( q . toList ( d0 . f0 . n . flattenSequenceOfIterable ( d0 . f0 . n . sequenceOf ( take , u . take ( arrayList2 , 40 - take . size ( ) ) ) ) ) ) ;
}
private final void handleLoadedUnicodeEmojis ( ModelEmojiUnicode . Bundle bundle ) {
HashMap hashMap = new HashMap ( ) ;
HashMap hashMap2 = new HashMap ( ) ;
HashMap hashMap3 = new HashMap ( ) ;
StoreEmoji$handleLoadedUnicodeEmojis$1 storeEmoji$handleLoadedUnicodeEmojis$1 = new StoreEmoji$handleLoadedUnicodeEmojis$1 ( hashMap3 , hashMap2 ) ;
Map < EmojiCategory , List < ModelEmojiUnicode > > emojis = bundle . getEmojis ( ) ;
m . checkNotNullExpressionValue ( emojis , " unicodeEmojisBundle.emojis " ) ;
for ( Map . Entry < EmojiCategory , List < ModelEmojiUnicode > > entry : emojis . entrySet ( ) ) {
EmojiCategory key = entry . getKey ( ) ;
List < ModelEmojiUnicode > value = entry . getValue ( ) ;
m . checkNotNullExpressionValue ( key , " category " ) ;
m . checkNotNullExpressionValue ( value , " categoryEmojis " ) ;
hashMap . put ( key , value ) ;
for ( ModelEmojiUnicode modelEmojiUnicode : value ) {
m . checkNotNullExpressionValue ( modelEmojiUnicode , " unicodeEmoji " ) ;
storeEmoji$handleLoadedUnicodeEmojis$1 . invoke ( modelEmojiUnicode ) ;
List < ModelEmojiUnicode > asDiverse = modelEmojiUnicode . getAsDiverse ( ) ;
m . checkNotNullExpressionValue ( asDiverse , " unicodeEmoji \ n .asDiverse " ) ;
for ( ModelEmojiUnicode modelEmojiUnicode2 : asDiverse ) {
m . checkNotNullExpressionValue ( modelEmojiUnicode2 , " diverseEmoji " ) ;
storeEmoji$handleLoadedUnicodeEmojis$1 . invoke ( modelEmojiUnicode2 ) ;
}
}
}
this . unicodeEmojis = hashMap ;
this . unicodeEmojisNamesMap = hashMap2 ;
this . unicodeEmojiSurrogateMap = hashMap3 ;
this . unicodeEmojisPattern = compileSurrogatesPattern ( ) ;
}
private final ModelEmojiUnicode . Bundle loadUnicodeEmojisFromDisk ( Context context ) {
Model parse = new Model . JsonReader ( new InputStreamReader ( context . getAssets ( ) . open ( " data/emojis.json " ) , " UTF-8 " ) ) . parse ( new ModelEmojiUnicode . Bundle ( ) ) ;
m . checkNotNullExpressionValue ( parse , " jsonReader.parse(ModelEmojiUnicode.Bundle()) " ) ;
return ( ModelEmojiUnicode . Bundle ) parse ;
}
@StoreThread
public final ModelEmojiCustom getCustomEmojiInternal ( long j ) {
for ( Map . Entry < Long , Map < Long , ModelEmojiCustom > > entry : this . customEmojiStore . getAllGuildEmojiInternal ( ) . entrySet ( ) ) {
ModelEmojiCustom modelEmojiCustom = entry . getValue ( ) . get ( Long . valueOf ( j ) ) ;
if ( modelEmojiCustom ! = null ) {
return modelEmojiCustom ;
}
}
return null ;
}
public final Observable < EmojiSet > getEmojiSet ( long j , long j2 , boolean z2 , boolean z3 ) {
return getEmojiSet ( new EmojiContext . Chat ( j , j2 ) , z2 , z3 ) ;
}
public final Observable < EmojiSet > getEmojiSet ( EmojiContext emojiContext , boolean z2 , boolean z3 ) {
Observable observable ;
m . checkNotNullParameter ( emojiContext , " emojiContext " ) ;
if ( emojiContext instanceof EmojiContext . Chat ) {
EmojiContext . Chat chat = ( EmojiContext . Chat ) emojiContext ;
if ( chat . getGuildId ( ) ! = 0 ) {
2021-07-03 23:36:06 +00:00
observable = this . permissionsStore . observePermissionsForChannel ( chat . getChannelId ( ) ) . F ( StoreEmoji$getEmojiSet$hasExternalEmojiPermissionObservable$1 . INSTANCE ) ;
Observable < EmojiSet > Y = Observable . h ( StoreUser . observeMe$default ( this . userStore , false , 1 , null ) . F ( StoreEmoji$getEmojiSet$1 . INSTANCE ) , observable , this . sortedGuildsStore . observeOrderedGuilds ( ) . F ( StoreEmoji$getEmojiSet$2 . INSTANCE ) , this . mediaFavoritesStore . observeFavorites ( StoreMediaFavorites . Favorite . Companion . getEmojiTypes ( ) ) , StoreEmoji$getEmojiSet$3 . INSTANCE ) . r ( ) . Y ( new StoreEmoji$getEmojiSet$4 ( this , emojiContext , z3 , z2 ) ) ;
m . checkNotNullExpressionValue ( Y , " Observable \ n .comb… } \ n } " ) ;
return Y ;
2021-06-27 20:44:35 +00:00
}
}
observable = new j ( Boolean . TRUE ) ;
2021-07-03 23:36:06 +00:00
Observable < EmojiSet > Y = Observable . h ( StoreUser . observeMe$default ( this . userStore , false , 1 , null ) . F ( StoreEmoji$getEmojiSet$1 . INSTANCE ) , observable , this . sortedGuildsStore . observeOrderedGuilds ( ) . F ( StoreEmoji$getEmojiSet$2 . INSTANCE ) , this . mediaFavoritesStore . observeFavorites ( StoreMediaFavorites . Favorite . Companion . getEmojiTypes ( ) ) , StoreEmoji$getEmojiSet$3 . INSTANCE ) . r ( ) . Y ( new StoreEmoji$getEmojiSet$4 ( this , emojiContext , z3 , z2 ) ) ;
m . checkNotNullExpressionValue ( Y , " Observable \ n .comb… } \ n } " ) ;
return Y ;
2021-06-27 20:44:35 +00:00
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.String, ? extends com.discord.models.domain.emoji.ModelEmojiUnicode>, java.util.Map<java.lang.String, com.discord.models.domain.emoji.ModelEmojiUnicode> */
@Override // com.discord.utilities.textprocessing.Rules.EmojiDataProvider
public Map < String , ModelEmojiUnicode > getUnicodeEmojiSurrogateMap ( ) {
Map map = this . unicodeEmojiSurrogateMap ;
if ( map = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojiSurrogateMap " ) ;
}
return map ;
}
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: java.util.Map<java.lang.String, ? extends com.discord.models.domain.emoji.ModelEmojiUnicode>, java.util.Map<java.lang.String, com.discord.models.domain.emoji.ModelEmojiUnicode> */
@Override // com.discord.utilities.textprocessing.Rules.EmojiDataProvider
public Map < String , ModelEmojiUnicode > getUnicodeEmojisNamesMap ( ) {
Map map = this . unicodeEmojisNamesMap ;
if ( map = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojisNamesMap " ) ;
}
return map ;
}
@Override // com.discord.utilities.textprocessing.Rules.EmojiDataProvider
public Pattern getUnicodeEmojisPattern ( ) {
Pattern pattern = this . unicodeEmojisPattern ;
if ( pattern = = null ) {
m . throwUninitializedPropertyAccessException ( " unicodeEmojisPattern " ) ;
}
return pattern ;
}
@StoreThread
public final void handlePreLogout ( ) {
Persister . clear$default ( this . frecencyCache , false , 1 , null ) ;
}
public final void initBlocking ( Context context ) {
m . checkNotNullParameter ( context , " context " ) ;
handleLoadedUnicodeEmojis ( loadUnicodeEmojisFromDisk ( context ) ) ;
}
public final void onEmojiUsed ( Emoji emoji ) {
m . checkNotNullParameter ( emoji , " emoji " ) ;
String uniqueId = emoji . getUniqueId ( ) ;
m . checkNotNullExpressionValue ( uniqueId , " emoji.uniqueId " ) ;
onEmojiUsed ( uniqueId ) ;
}
public final void onEmojiUsed ( String str ) {
m . checkNotNullParameter ( str , " emojiKey " ) ;
FrecencyTracker . track$default ( this . frecency , str , 0 , 2 , null ) ;
Persister . set$default ( this . frecencyCache , this . frecency , false , 2 , null ) ;
}
}