Skip to content

Commit

Permalink
fix: download button displayed in wrong condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dic1911 committed Oct 9, 2024
1 parent bc6772c commit 6d60485
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3387,7 +3387,6 @@ public boolean canToggleSearch() {
actionBar.setSupportsHolidayImage(true);
}
}
Log.d("030-tabs", String.format("createView - hide: %s, type: %d", forceHideTabs, initialDialogsType));
if (!forceHideTabs && (!onlySelect || initialDialogsType == DIALOGS_TYPE_FORWARD || (folderId == 0 && NekoConfig.showTabsOnForward.Bool()))) {
actionBar.setAddToContainer(false);
actionBar.setCastShadows(false);
Expand Down Expand Up @@ -5429,6 +5428,7 @@ public void openAnimationFinished(boolean backward) {
}
updateDrawerSwipeEnabled();
updateFilterTabs(false, true);
if (!hasFragment()) updateProxyButton(false, true);
}

@Override
Expand Down Expand Up @@ -10109,7 +10109,7 @@ private void updateProxyButton(boolean animated, boolean force) {
if (proxyDrawable == null || doneItem != null && doneItem.getVisibility() == View.VISIBLE) {
return;
}
boolean showDownloads = downloadsItemVisible = NekoConfig.alwaysShowDownloads.Bool();
boolean showDownloads = downloadsItemVisible = NekoConfig.alwaysShowDownloads.Bool() && !slidingTopicListOpened();
for (int i = 0; i < getDownloadController().downloadingFiles.size() && !showDownloads; i++) {
if (getFileLoader().isLoadingFile(getDownloadController().downloadingFiles.get(i).getFileName())) {
showDownloads = true;
Expand Down Expand Up @@ -10202,7 +10202,7 @@ public void onAnimationEnd(Animator animation) {
if (passcodeItem != null && passcodeItemVisible) {
passcodeItem.setVisibility(View.INVISIBLE);
}
if (downloadsItem != null && downloadsItemVisible && !NekoConfig.alwaysShowDownloads.Bool()) {
if (downloadsItem != null && downloadsItemVisible) {
downloadsItem.setVisibility(View.INVISIBLE);
}
} else {
Expand Down Expand Up @@ -13133,4 +13133,8 @@ public void onLongClickRelease() {
searchViewPager.setFilteredSearchViewDelegate((showMediaFilters, users, dates, archive) -> DialogsActivity.this.updateFiltersView(showMediaFilters, users, dates, archive, true));
searchViewPager.setVisibility(View.GONE);
}

private boolean slidingTopicListOpened() {
return rightSlidingDialogContainer != null && rightSlidingDialogContainer.hasFragment() && rightSlidingDialogContainer.isOpenned;
}
}

0 comments on commit 6d60485

Please sign in to comment.