diff options
Diffstat (limited to 'WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java')
-rw-r--r-- | WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java b/WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java index 4326e0ae6..408194613 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsDetailActivity.java @@ -90,6 +90,9 @@ public class NotificationsDetailActivity extends AppCompatActivity implements return; } } + + GCMMessageService.removeNotificationWithNoteIdFromSystemBar(this, noteId);//clearNotifications(); + } else if (savedInstanceState.containsKey(ARG_TITLE) && getSupportActionBar() != null) { getSupportActionBar().setTitle(StringUtils.notNullStr(savedInstanceState.getString(ARG_TITLE))); } @@ -99,7 +102,6 @@ public class NotificationsDetailActivity extends AppCompatActivity implements getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); } - GCMMessageService.clearNotifications(); } @Override @@ -138,7 +140,13 @@ public class NotificationsDetailActivity extends AppCompatActivity implements Fragment fragment; if (note.isCommentType()) { // show comment detail for comment notifications - fragment = CommentDetailFragment.newInstance(note.getId()); + boolean isInstantLike = getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_LIKE_EXTRA, false); + boolean isInstantApprove = getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_APPROVE_EXTRA, false); + fragment = isInstantLike ? + CommentDetailFragment.newInstanceForInstantLike(note.getId()) : + isInstantApprove ? + CommentDetailFragment.newInstanceForInstantApprove(note.getId()) : + CommentDetailFragment.newInstance(note.getId()); } else if (note.isAutomattcherType()) { // show reader post detail for automattchers about posts - note that comment // automattchers are handled by note.isCommentType() above |