try fix tabs crash

This commit is contained in:
luvletter2333 2022-07-10 15:10:49 +08:00
parent f8a72d335e
commit ec0caec469
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
1 changed files with 1 additions and 1 deletions

View File

@ -1327,7 +1327,7 @@ public class FilterTabsView extends FrameLayout {
Tab firstTab = findDefaultTab();
int tabWith = 0;
int trueTabsWidth = allTabsWidth ;
if (showAllChatsTab) {
if (showAllChatsTab && firstTab != null) {
tabWith = firstTab.getWidth(false);
trueTabsWidth = allTabsWidth - tabWith;
firstTab.setTitle(allTabsWidth > width ? LocaleController.getString("FilterAllChatsShort", R.string.FilterAllChatsShort) : LocaleController.getString("FilterAllChats", R.string.FilterAllChats));