Don't cast class to MainActivity to show message (#7771)

We can do that using an event.
This commit fixes one of the most prominent crashes on Google Play
where we cast the OnlineFeedViewActivity to MainActivity.
This commit is contained in:
ByteHamster
2025-04-30 22:12:11 +02:00
committed by GitHub
parent 310ce203ce
commit 373cde5c0a
28 changed files with 126 additions and 164 deletions

View File

@ -76,6 +76,11 @@ public class MainActivityStarter {
return this;
}
public MainActivityStarter withClearTop() {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
return this;
}
public MainActivityStarter withFragmentArgs(String name, boolean value) {
if (fragmentArgs == null) {
fragmentArgs = new Bundle();