generalize notification handling, open reports in browser

This commit is contained in:
sk
2023-06-03 22:47:20 +02:00
parent 7a6af89375
commit 37622ba9ce
3 changed files with 22 additions and 30 deletions

View File

@@ -117,25 +117,13 @@ public class MainActivity extends FragmentStackActivity implements ProvidesAssis
}
private void showFragmentForNotification(Notification notification, String accountID){
Fragment fragment;
Bundle args=new Bundle();
args.putString("account", accountID);
args.putBoolean("_can_go_back", true);
try{
notification.postprocess();
}catch(ObjectValidationException x){
Log.w("MainActivity", x);
return;
}
if(notification.status!=null){
fragment=new ThreadFragment();
args.putParcelable("status", Parcels.wrap(notification.status));
}else{
fragment=new ProfileFragment();
args.putParcelable("profileAccount", Parcels.wrap(notification.account));
}
fragment.setArguments(args);
showFragment(fragment);
UiUtils.showFragmentForNotification(this, notification, accountID, null);
}
private void showFragmentForExternalShare(Bundle args) {