mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-28 16:55:56 +00:00
Show/hide up button on expand/collapse
This commit is contained in:
parent
008520bbbf
commit
7ade3229b2
1 changed files with 9 additions and 9 deletions
|
@ -646,7 +646,7 @@ public class FragmentMessages extends FragmentBase {
|
||||||
swipeRefresh.setEnabled(pull);
|
swipeRefresh.setEnabled(pull);
|
||||||
tvNoEmail.setVisibility(View.GONE);
|
tvNoEmail.setVisibility(View.GONE);
|
||||||
seekBar.setVisibility(View.GONE);
|
seekBar.setVisibility(View.GONE);
|
||||||
ibUp.setVisibility(viewType == AdapterMessage.ViewType.THREAD ? View.VISIBLE : View.GONE);
|
ibUp.setVisibility(View.GONE);
|
||||||
bottom_navigation.getMenu().findItem(R.id.action_prev).setEnabled(false);
|
bottom_navigation.getMenu().findItem(R.id.action_prev).setEnabled(false);
|
||||||
bottom_navigation.getMenu().findItem(R.id.action_next).setEnabled(false);
|
bottom_navigation.getMenu().findItem(R.id.action_next).setEnabled(false);
|
||||||
bottom_navigation.setVisibility(View.GONE);
|
bottom_navigation.setVisibility(View.GONE);
|
||||||
|
@ -848,10 +848,14 @@ public class FragmentMessages extends FragmentBase {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
if (!values.get(name).contains(id))
|
if (!values.get(name).contains(id))
|
||||||
values.get(name).add(id);
|
values.get(name).add(id);
|
||||||
if ("expanded".equals(name))
|
|
||||||
handleExpand(id);
|
|
||||||
} else
|
} else
|
||||||
values.get(name).remove(id);
|
values.get(name).remove(id);
|
||||||
|
|
||||||
|
if ("expanded".equals(name)) {
|
||||||
|
if (enabled)
|
||||||
|
handleExpand(id);
|
||||||
|
ibUp.setVisibility(values.get(name).size() > 0 ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2773,12 +2777,8 @@ public class FragmentMessages extends FragmentBase {
|
||||||
expand = messages.get(0);
|
expand = messages.get(0);
|
||||||
|
|
||||||
if (expand != null &&
|
if (expand != null &&
|
||||||
(expand.content || unmetered || (expand.size != null && expand.size < download))) {
|
(expand.content || unmetered || (expand.size != null && expand.size < download)))
|
||||||
if (!values.containsKey("expanded"))
|
iProperties.setValue("expanded", expand.id, true);
|
||||||
values.put("expanded", new ArrayList<Long>());
|
|
||||||
values.get("expanded").add(expand.id);
|
|
||||||
handleExpand(expand.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (autoCloseCount > 0 && (autoclose || autonext)) {
|
if (autoCloseCount > 0 && (autoclose || autonext)) {
|
||||||
|
|
Loading…
Reference in a new issue