diff options
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/command')
7 files changed, 13 insertions, 9 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandFavAndRT.java b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandFavAndRT.java index fe1a100f..9d5f5471 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandFavAndRT.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandFavAndRT.java @@ -59,7 +59,7 @@ public class StatusCommandFavAndRT extends StatusCommand implements IConfirmable @Override public boolean isEnabled() { User user = getOriginalStatus().getUser(); - return !user.isProtected() && user.getId() != account.userID; + return !user.isProtected() && user.getId() != account.getUserId(); } // -------------------------- OTHER METHODS -------------------------- diff --git a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandMakeAnonymous.java b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandMakeAnonymous.java index 8f485b93..fa8cc5e0 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandMakeAnonymous.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandMakeAnonymous.java @@ -29,6 +29,7 @@ import net.lacolaco.smileessence.R; import net.lacolaco.smileessence.command.IConfirmable; import net.lacolaco.smileessence.entity.Account; import net.lacolaco.smileessence.entity.Tweet; +import net.lacolaco.smileessence.entity.User; import net.lacolaco.smileessence.notification.NotificationType; import net.lacolaco.smileessence.notification.Notificator; import net.lacolaco.smileessence.twitter.TweetBuilder; @@ -52,13 +53,14 @@ public class StatusCommandMakeAnonymous extends StatusCommand implements IConfir // --------------------------- CONSTRUCTORS --------------------------- public static String build(Activity activity, Tweet tweet, Account account) { + User user = account.getUser(); String str = tweet.getText(); String header = ""; if (str.startsWith(".")) { str = str.replaceFirst(".", ""); } - if (str.startsWith(String.format("@%s", account.screenName))) { - str = str.replaceFirst(String.format("@%s", account.screenName), "").trim(); + if (str.startsWith(String.format("@%s", user.getScreenName()))) { + str = str.replaceFirst(String.format("@%s", user.getScreenName()), "").trim(); } str = activity.getString(R.string.format_status_command_make_anonymous, str).trim(); return str; diff --git a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandNanigaja.java b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandNanigaja.java index 5562c2b4..f132db1e 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandNanigaja.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/status/StatusCommandNanigaja.java @@ -29,6 +29,7 @@ import net.lacolaco.smileessence.R; import net.lacolaco.smileessence.command.IConfirmable; import net.lacolaco.smileessence.entity.Account; import net.lacolaco.smileessence.entity.Tweet; +import net.lacolaco.smileessence.entity.User; import net.lacolaco.smileessence.notification.NotificationType; import net.lacolaco.smileessence.notification.Notificator; import net.lacolaco.smileessence.twitter.TweetBuilder; @@ -64,13 +65,14 @@ public class StatusCommandNanigaja extends StatusCommand implements IConfirmable // -------------------------- OTHER METHODS -------------------------- public String build() { + User user = account.getUser(); String str = getOriginalStatus().getText(); String header = ""; if (str.startsWith(".")) { str = str.replaceFirst(".", ""); } - if (str.startsWith(String.format("@%s", account.screenName))) { - str = str.replaceFirst(String.format("@%s", account.screenName), "").trim(); + if (str.startsWith(String.format("@%s", user.getScreenName()))) { + str = str.replaceFirst(String.format("@%s", user.getScreenName()), "").trim(); header = "@" + getOriginalStatus().getUser().getScreenName(); } str = String.format("%s %s", header, String.format(getFormatString(getActivity()), str)).trim(); diff --git a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandBlock.java b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandBlock.java index d0736f93..793eb610 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandBlock.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandBlock.java @@ -55,7 +55,7 @@ public class UserCommandBlock extends UserCommand implements IConfirmable { @Override public boolean isEnabled() { - return getUser().getId() != account.userID; + return getUser().getId() != account.getUserId(); } // -------------------------- OTHER METHODS -------------------------- diff --git a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandReportForSpam.java b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandReportForSpam.java index 65da7eba..5b185dbc 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandReportForSpam.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandReportForSpam.java @@ -55,7 +55,7 @@ public class UserCommandReportForSpam extends UserCommand implements IConfirmabl @Override public boolean isEnabled() { - return getUser().getId() != account.userID; + return getUser().getId() != account.getUserId(); } // -------------------------- OTHER METHODS -------------------------- diff --git a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandSendMessage.java b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandSendMessage.java index 7a88ceb1..3b60f54e 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandSendMessage.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandSendMessage.java @@ -53,7 +53,7 @@ public class UserCommandSendMessage extends UserCommand { @Override public boolean isEnabled() { - return account.userID != getUser().getId(); + return account.getUserId() != getUser().getId(); } // -------------------------- OTHER METHODS -------------------------- diff --git a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandUnblock.java b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandUnblock.java index d35a6402..524bc39e 100644 --- a/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandUnblock.java +++ b/app/src/main/java/net/lacolaco/smileessence/command/user/UserCommandUnblock.java @@ -55,7 +55,7 @@ public class UserCommandUnblock extends UserCommand implements IConfirmable { @Override public boolean isEnabled() { - return getUser().getId() != account.userID; + return getUser().getId() != account.getUserId(); } // -------------------------- OTHER METHODS -------------------------- |