diff options
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/viewmodel')
-rw-r--r-- | app/src/main/java/net/lacolaco/smileessence/viewmodel/StatusViewModel.java | 2 | ||||
-rw-r--r-- | app/src/main/java/net/lacolaco/smileessence/viewmodel/menu/MainActivityMenuHelper.java | 19 |
2 files changed, 4 insertions, 17 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/viewmodel/StatusViewModel.java b/app/src/main/java/net/lacolaco/smileessence/viewmodel/StatusViewModel.java index 5fd54bf8..53f6b679 100644 --- a/app/src/main/java/net/lacolaco/smileessence/viewmodel/StatusViewModel.java +++ b/app/src/main/java/net/lacolaco/smileessence/viewmodel/StatusViewModel.java @@ -150,7 +150,7 @@ public class StatusViewModel implements IViewModel { if (tweet.isRetweet()) { int colorBgRetweet = Themes.getStyledColor(activity, theme, R.attr.color_status_bg_retweet, 0); convertedView.setBackgroundColor(colorBgRetweet); - } else if (account.getCachedUser() != null && tweet.getOriginalTweet().getMentions().contains(account.getCachedUser().getScreenName())) { + } else if (tweet.getOriginalTweet().getMentions().contains(account.getUser().getScreenName())) { int colorBgMention = Themes.getStyledColor(activity, theme, R.attr.color_status_bg_mention, 0); convertedView.setBackgroundColor(colorBgMention); } else { diff --git a/app/src/main/java/net/lacolaco/smileessence/viewmodel/menu/MainActivityMenuHelper.java b/app/src/main/java/net/lacolaco/smileessence/viewmodel/menu/MainActivityMenuHelper.java index 28bc5cd0..58a866fa 100644 --- a/app/src/main/java/net/lacolaco/smileessence/viewmodel/menu/MainActivityMenuHelper.java +++ b/app/src/main/java/net/lacolaco/smileessence/viewmodel/menu/MainActivityMenuHelper.java @@ -71,7 +71,6 @@ public class MainActivityMenuHelper { } public static boolean onItemSelected(MainActivity activity, MenuItem item) { - User user = activity.getCurrentAccount().getCachedUser(); switch (item.getItemId()) { case R.id.actionbar_post: { openPostPage(activity); @@ -107,27 +106,15 @@ public class MainActivityMenuHelper { return true; } case R.id.actionbar_favstar: { - if (user == null) { - Notificator.getInstance().publish(R.string.notice_application_starting); - } else { - new CommandOpenURL(activity, user.getFavstarRecentURL()).execute(); - } + new CommandOpenURL(activity, activity.getCurrentAccount().getUser().getFavstarRecentURL()).execute(); return true; } case R.id.actionbar_aclog: { - if (user == null) { - Notificator.getInstance().publish(R.string.notice_application_starting); - } else { - new CommandOpenURL(activity, user.getAclogTimelineURL()).execute(); - } + new CommandOpenURL(activity, activity.getCurrentAccount().getUser().getAclogTimelineURL()).execute(); return true; } case R.id.actionbar_twilog: { - if (user == null) { - Notificator.getInstance().publish(R.string.notice_application_starting); - } else { - new CommandOpenURL(activity, user.getTwilogURL()).execute(); - } + new CommandOpenURL(activity, activity.getCurrentAccount().getUser().getTwilogURL()).execute(); return true; } case R.id.actionbar_report: { |