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