@Override MessageEditorData executeAsync(MyAccount maIn, long msgId) { MyAccount ma = MyContextHolder.get() .persistentAccounts() .fromUserId(MyQuery.msgIdToLongColumnValue(MyDatabase.Msg.SENDER_ID, msgId)); CommandData commandData = CommandData.updateStatus(ma.getAccountName(), msgId); MyServiceManager.sendManualForegroundCommand(commandData); return null; }
public static void selectTimeline( FragmentActivity activity, ActivityRequestCode requestCode, Timeline timeline, MyAccount currentMyAccount) { SelectorDialog selector = new TimelineSelector(); selector.setRequestCode(requestCode); selector.getArguments().putLong(IntentExtra.TIMELINE_ID.key, timeline.getId()); selector .getArguments() .putString(IntentExtra.ACCOUNT_NAME.key, currentMyAccount.getAccountName()); selector.show(activity); }
public boolean onContextItemSelected(MenuItem item) { MyAccount ma = getMyActor(); if (ma.isValid()) { UserListContextMenuItem contextMenuItem = UserListContextMenuItem.fromId(item.getItemId()); MyLog.v( this, "onContextItemSelected: " + contextMenuItem + "; actor=" + ma.getAccountName() + "; user=" + getViewItem().mbUser.getNamePreferablyWebFingerId()); return contextMenuItem.execute(this, ma); } else { return false; } }
private void retrieveFromInternet(long msgId) { MyLog.v(this, "Message id=" + msgId + " should be retrieved from the Internet"); MyServiceManager.sendCommand( new CommandData(CommandEnum.GET_STATUS, ma.getAccountName(), msgId)); }