|
@@ -79,6 +79,7 @@ import androidx.annotation.StringRes;
|
|
import androidx.appcompat.app.ActionBar;
|
|
import androidx.appcompat.app.ActionBar;
|
|
import androidx.core.graphics.drawable.DrawableCompat;
|
|
import androidx.core.graphics.drawable.DrawableCompat;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
+import androidx.lifecycle.Lifecycle;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindString;
|
|
import butterknife.BindString;
|
|
import butterknife.BindView;
|
|
import butterknife.BindView;
|
|
@@ -330,16 +331,18 @@ public class UserInfoActivity extends FileActivity implements Injectable {
|
|
RemoteOperation getRemoteUserInfoOperation = new GetUserInfoRemoteOperation();
|
|
RemoteOperation getRemoteUserInfoOperation = new GetUserInfoRemoteOperation();
|
|
RemoteOperationResult result = getRemoteUserInfoOperation.execute(user.toPlatformAccount(), this);
|
|
RemoteOperationResult result = getRemoteUserInfoOperation.execute(user.toPlatformAccount(), this);
|
|
|
|
|
|
- if (result.isSuccess() && result.getData() != null) {
|
|
|
|
- userInfo = (UserInfo) result.getData().get(0);
|
|
|
|
|
|
+ if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) {
|
|
|
|
+ if (result.isSuccess() && result.getData() != null) {
|
|
|
|
+ userInfo = (UserInfo) result.getData().get(0);
|
|
|
|
|
|
- runOnUiThread(() -> populateUserInfoUi(userInfo));
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- // show error
|
|
|
|
- runOnUiThread(() -> setErrorMessageForMultiList(sorryMessage, result.getLogMessage(),
|
|
|
|
- R.drawable.ic_list_empty_error));
|
|
|
|
- Log_OC.d(TAG, result.getLogMessage());
|
|
|
|
|
|
+ runOnUiThread(() -> populateUserInfoUi(userInfo));
|
|
|
|
+ } else {
|
|
|
|
+ // show error
|
|
|
|
+ runOnUiThread(() -> setErrorMessageForMultiList(sorryMessage,
|
|
|
|
+ result.getLogMessage(),
|
|
|
|
+ R.drawable.ic_list_empty_error));
|
|
|
|
+ Log_OC.d(TAG, result.getLogMessage());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|