mirror of https://github.com/NekoX-Dev/NekoX.git
Refine pressTitleToOpenAllChats
This commit is contained in:
parent
e38ef93fad
commit
f82978c683
|
@ -1555,7 +1555,7 @@ public class FilterTabsView extends FrameLayout {
|
|||
return listView;
|
||||
}
|
||||
|
||||
public boolean showAllChatsTab = false;
|
||||
public boolean showAllChatsTab = !NekoConfig.hideAllTab;
|
||||
|
||||
public void toggleAllTabs(boolean show) {
|
||||
if (show == showAllChatsTab)
|
||||
|
|
|
@ -2099,15 +2099,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
actionBar.setTitle(LocaleController.getString("SelectChat", R.string.SelectChat));
|
||||
}
|
||||
actionBar.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefault));
|
||||
if (NekoConfig.hideAllTab) {
|
||||
actionBar.setOnLongClickListener(v -> {
|
||||
if (NekoConfig.pressTitleToOpenAllChats && filterTabsView != null && filterTabsView.getCurrentTabId() != Integer.MAX_VALUE) {
|
||||
filterTabsView.toggleAllTabs(true);
|
||||
filterTabsView.selectFirstTab();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
actionBar.setOnLongClickListener(v -> {
|
||||
if (NekoConfig.hideAllTab && NekoConfig.pressTitleToOpenAllChats && filterTabsView != null && filterTabsView.getCurrentTabId() != Integer.MAX_VALUE) {
|
||||
filterTabsView.toggleAllTabs(true);
|
||||
filterTabsView.selectFirstTab();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
if (searchString != null || folderId != 0) {
|
||||
actionBar.setBackButtonDrawable(backDrawable = new BackDrawable(false));
|
||||
|
@ -2119,15 +2117,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
actionBar.setTitle(LocaleController.getString("ArchivedChats", R.string.ArchivedChats));
|
||||
} else {
|
||||
actionBar.setTitle(LocaleController.getString("NekoX", R.string.NekoX));
|
||||
if (NekoConfig.hideAllTab) {
|
||||
actionBar.setOnLongClickListener(v -> {
|
||||
if (NekoConfig.pressTitleToOpenAllChats && filterTabsView != null && filterTabsView.getCurrentTabId() != Integer.MAX_VALUE) {
|
||||
filterTabsView.toggleAllTabs(true);
|
||||
filterTabsView.selectFirstTab();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
actionBar.setOnLongClickListener(v -> {
|
||||
if (NekoConfig.hideAllTab && NekoConfig.pressTitleToOpenAllChats && filterTabsView != null && filterTabsView.getCurrentTabId() != Integer.MAX_VALUE) {
|
||||
filterTabsView.toggleAllTabs(true);
|
||||
filterTabsView.selectFirstTab();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if (folderId == 0) {
|
||||
actionBar.setSupportsHolidayImage(true);
|
||||
|
|
|
@ -211,6 +211,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
|||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(NekoConfig.pressTitleToOpenAllChats);
|
||||
}
|
||||
getNotificationCenter().postNotificationName(NotificationCenter.dialogFiltersUpdated);
|
||||
} else if (position == tabsTitleTypeRow) {
|
||||
PopupBuilder builder = new PopupBuilder(view);
|
||||
|
||||
|
|
Loading…
Reference in New Issue