mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-15 18:59:12 +03:00
Fix disabled global custom emote room packs still being shown
Change-Id: If97800ce3c47aac9aefaae81a3777877844320da
This commit is contained in:
parent
94b996b52a
commit
dd9bbeef1b
1 changed files with 4 additions and 0 deletions
|
@ -119,6 +119,10 @@ class AutocompleteEmojiPresenter @AssistedInject constructor(
|
|||
val globalPacks = session.accountDataService().getUserAccountDataEvent(UserAccountDataTypes.TYPE_EMOTE_ROOMS)
|
||||
var packsAdded = 0
|
||||
(globalPacks?.content?.get("rooms") as? Map<*, *>)?.forEach { pack ->
|
||||
// If entry is empty, it has been disabled as global pack (after being enabled before).
|
||||
if ((pack.value as? Map<*, *>).isNullOrEmpty()) {
|
||||
return@forEach
|
||||
}
|
||||
if (packsAdded >= AutocompleteEmojiController.MAX_CUSTOM_OTHER_ROOMS) {
|
||||
return@forEach
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue