Skip to content

Commit

Permalink
Fix Frecents not showing category
Browse files Browse the repository at this point in the history
  • Loading branch information
zt64 committed Oct 24, 2024
1 parent f82dde2 commit 8c57825
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugin/Frecents/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description = "Adds support for favorite GIFs, emojis, stickers, and recent item
aliucord.excludeFromUpdaterJson.set(true)
aliucord.changelog.set(
"""
# 1.0.1
- Fix mixup causing favorites category to not appear
# 1.0.0
- Initial release
""".trimIndent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,12 @@ class Frecents : Plugin() {
}
}

// Add favorites section to the gif categories list
patcher.before<WidgetGifPicker>(
"handleViewState",
GifPickerViewModel.ViewState::class.java
) { (param, viewState: GifPickerViewModel.ViewState) ->
if (frecencyUserSettings.favoriteStickers.stickerIdsCount != 0) {
if (frecencyUserSettings.favoriteGifs.gifsCount > 0) {
param.args[0] = GifPickerViewModel.ViewState(
listOf(GifCategoryItemFavorites(null)) + viewState.gifCategoryItems
)
Expand Down

0 comments on commit 8c57825

Please sign in to comment.