Skip to content

Commit

Permalink
show next warning
Browse files Browse the repository at this point in the history
fixes bug in warnings where only the first message is shown when multiple warnings are queued.
  • Loading branch information
forrestguice committed Jan 16, 2025
1 parent d44addd commit 25016a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ public void onDismissed(Snackbar snackbar, int event)
{
case DISMISS_EVENT_SWIPE:
wasDismissed = true;
showNextWarning();
snackbar.get().getView().post(new Runnable() {
@Override
public void run() {
showNextWarning();
}
});
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public void restoreWarnings(Bundle savedState)
warning.setWarningListener(warningListener);
}
}
public void restoreWarningListener() {
for (SuntimesWarning warning : warnings) {
warning.setWarningListener(warningListener);
}
}

/**
* resetWarnings
Expand Down Expand Up @@ -263,6 +268,7 @@ public void onShowNextWarning() {
showWarnings(contextRef.get());
}
};
restoreWarningListener();
}

}

0 comments on commit 25016a5

Please sign in to comment.