Prevent crash

This commit is contained in:
M66B
2021-09-28 21:15:46 +02:00
parent d69cdbb506
commit 3f228fc559
12 changed files with 57 additions and 7 deletions

View File

@@ -420,6 +420,8 @@ public class FragmentAccount extends FragmentBase {
getMainHandler().post(new Runnable() {
@Override
public void run() {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
scroll.smoothScrollTo(0, btnAdvanced.getTop());
}
});
@@ -781,6 +783,8 @@ public class FragmentAccount extends FragmentBase {
getMainHandler().post(new Runnable() {
@Override
public void run() {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
scroll.smoothScrollTo(0, cbIdentity.getBottom());
}
});
@@ -1371,6 +1375,8 @@ public class FragmentAccount extends FragmentBase {
getMainHandler().post(new Runnable() {
@Override
public void run() {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
if (provider != null && provider.documentation != null)
scroll.smoothScrollTo(0, tvInstructions.getBottom());
else
@@ -1695,6 +1701,8 @@ public class FragmentAccount extends FragmentBase {
getMainHandler().post(new Runnable() {
@Override
public void run() {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
scroll.smoothScrollTo(0, (save ? btnSave : btnCheck).getBottom());
}
});