convert EmojiPreference and EmojiCompatFont to Kotlin (#1922)
* convert EmojiPreference and EmojiCompatFont to Kotlin * move preference related to to dedicated preference package * update proguard-rules.pro * reformat & add comment * maintain disposable information in EmojiPreference instead of EmojiCompatFont
This commit is contained in:
parent
fc7b02d987
commit
1d309850b0
21 changed files with 709 additions and 906 deletions
|
|
@ -24,6 +24,7 @@ import androidx.preference.PreferenceManager
|
|||
import androidx.work.WorkManager
|
||||
import com.keylesspalace.tusky.components.notifications.NotificationWorkerFactory
|
||||
import com.keylesspalace.tusky.di.AppInjector
|
||||
import com.keylesspalace.tusky.settings.PrefKeys
|
||||
import com.keylesspalace.tusky.util.*
|
||||
import com.uber.autodispose.AutoDisposePlugins
|
||||
import dagger.android.DispatchingAndroidInjector
|
||||
|
|
@ -53,7 +54,7 @@ class TuskyApplication : Application(), HasAndroidInjector {
|
|||
val preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
|
||||
// init the custom emoji fonts
|
||||
val emojiSelection = preferences.getInt(EmojiPreference.FONT_PREFERENCE, 0)
|
||||
val emojiSelection = preferences.getInt(PrefKeys.EMOJI, 0)
|
||||
val emojiConfig = EmojiCompatFont.byId(emojiSelection)
|
||||
.getConfig(this)
|
||||
.setReplaceAll(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue