fix: update ghost mode toggle logic

This commit is contained in:
ZavaruKitsu
2023-07-28 10:15:18 +00:00
parent 3310adaada
commit e3083040c8

View File

@@ -429,7 +429,7 @@ public class AyuGramPreferencesActivity extends BasePreferencesActivity implemen
TextCheckCell2 checkCell = (TextCheckCell2) holder.itemView;
if (position == ghostModeToggleRow) {
int selectedCount = getGhostModeSelectedCount();
checkCell.setTextAndCheck(LocaleController.getString(R.string.GhostModeToggle), selectedCount > 0, true, true);
checkCell.setTextAndCheck(LocaleController.getString(R.string.GhostModeToggle), AyuConfig.isGhostModeActive(), true, true);
checkCell.setCollapseArrow(String.format(Locale.US, "%d/4", selectedCount), !ghostModeMenuExpanded, () -> {
AyuConfig.toggleGhostMode();
updateGhostViews();