Add remote config for GIF keyboard page.

This commit is contained in:
Nicholas Tinsley
2024-01-30 16:53:42 -05:00
parent f97a034c34
commit a60419a442
4 changed files with 20 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import org.signal.core.util.ThreadUtil
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.stickers.StickerSearchRepository
import org.thoughtcrime.securesms.util.DefaultValueLiveData
import org.thoughtcrime.securesms.util.FeatureFlags
class KeyboardPagerViewModel : ViewModel() {
@@ -18,6 +19,11 @@ class KeyboardPagerViewModel : ViewModel() {
if (SignalStore.settings().isPreferSystemEmoji) {
startingPages.remove(KeyboardPage.EMOJI)
}
if (!FeatureFlags.gifSearchAvailable()) {
startingPages.remove(KeyboardPage.GIF)
}
pages = DefaultValueLiveData(startingPages)
page = DefaultValueLiveData(startingPages.first())