Skip to content

Commit

Permalink
use commitAllowingStateLoss
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <alper_ozturk@proton.me>
  • Loading branch information
alperozturk96 committed May 24, 2024
1 parent a28c11a commit 56199b9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,17 +520,16 @@ protected void updateFileFromDB(){
* Show loading dialog
*/
public void showLoadingDialog(String message) {
// grant that only one waiting dialog is shown
dismissLoadingDialog();
// Construct dialog

Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag == null) {
Log_OC.d(TAG, "show loading dialog");
LoadingDialog loading = LoadingDialog.newInstance(message);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
loading.show(ft, DIALOG_WAIT_TAG);
fm.executePendingTransactions();
ft.add(loading, DIALOG_WAIT_TAG);
ft.commitAllowingStateLoss();
}
}

Expand Down

0 comments on commit 56199b9

Please sign in to comment.