Skip to content

Commit

Permalink
Fix by Alper
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
  • Loading branch information
JonasMayerDev committed May 23, 2024
1 parent 66cecd1 commit 02c7ebe
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,17 +520,20 @@ 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();

if (mResumed) {
// 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();
}
}
}

Expand Down

0 comments on commit 02c7ebe

Please sign in to comment.