mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix shortcut
This commit is contained in:
parent
52c255d42d
commit
552502b96a
@ -11,6 +11,7 @@ import android.support.v7.app.AppCompatActivity;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.database.Address;
|
import org.thoughtcrime.securesms.database.Address;
|
||||||
|
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
|
||||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||||
import org.thoughtcrime.securesms.util.CommunicationActions;
|
import org.thoughtcrime.securesms.util.CommunicationActions;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ public class ShortcutLauncherActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
if (serializedAddress == null) {
|
if (serializedAddress == null) {
|
||||||
Toast.makeText(this, R.string.ShortcutLauncherActivity_invalid_shortcut, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.ShortcutLauncherActivity_invalid_shortcut, Toast.LENGTH_SHORT).show();
|
||||||
startActivity(new Intent(this, ConversationListActivity.class));
|
startActivity(new Intent(this, HomeActivity.class));
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -45,7 +46,7 @@ public class ShortcutLauncherActivity extends AppCompatActivity {
|
|||||||
Address address = Address.fromSerialized(serializedAddress);
|
Address address = Address.fromSerialized(serializedAddress);
|
||||||
Recipient recipient = Recipient.from(this, address, true);
|
Recipient recipient = Recipient.from(this, address, true);
|
||||||
TaskStackBuilder backStack = TaskStackBuilder.create(this)
|
TaskStackBuilder backStack = TaskStackBuilder.create(this)
|
||||||
.addNextIntent(new Intent(this, ConversationListActivity.class));
|
.addNextIntent(new Intent(this, HomeActivity.class));
|
||||||
|
|
||||||
CommunicationActions.startConversation(this, recipient, null, backStack);
|
CommunicationActions.startConversation(this, recipient, null, backStack);
|
||||||
finish();
|
finish();
|
||||||
|
@ -3127,11 +3127,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
case "messageSent": actionBarSubtitleTextView.setText("Message sent securely"); break;
|
case "messageSent": actionBarSubtitleTextView.setText("Message sent securely"); break;
|
||||||
case "messageFailed": actionBarSubtitleTextView.setText("Message failed to send"); break;
|
case "messageFailed": actionBarSubtitleTextView.setText("Message failed to send"); break;
|
||||||
}
|
}
|
||||||
} else if (recipient.isGroupRecipient()) {
|
|
||||||
actionBarSubtitleTextView.setText("26 members");
|
|
||||||
} else if (recipient.isMuted()) {
|
} else if (recipient.isMuted()) {
|
||||||
muteIndicatorImageView.setVisibility(View.VISIBLE);
|
muteIndicatorImageView.setVisibility(View.VISIBLE);
|
||||||
actionBarSubtitleTextView.setText("Muted until " + DateUtils.getFormattedDateTime(recipient.mutedUntil, "EEE, MMM d, yyyy HH:mm", Locale.getDefault()));
|
actionBarSubtitleTextView.setText("Muted until " + DateUtils.getFormattedDateTime(recipient.mutedUntil, "EEE, MMM d, yyyy HH:mm", Locale.getDefault()));
|
||||||
|
} else if (recipient.isGroupRecipient()) {
|
||||||
|
actionBarSubtitleTextView.setText("26 members");
|
||||||
} else {
|
} else {
|
||||||
actionBarSubtitleTextView.setVisibility(View.GONE);
|
actionBarSubtitleTextView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user