Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
one last fix with activity state and intents for notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Feb 16, 2018
1 parent 178a84f commit 0271ee0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@
android:name="org.awesomeapp.messenger.ui.ConversationDetailActivity"
android:exported="false"
android:theme="@style/AppThemeNoAction"
android:launchMode="singleInstance"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name="org.awesomeapp.messenger.ui.ContactListActivity"
Expand Down
9 changes: 3 additions & 6 deletions app/src/main/java/org/awesomeapp/messenger/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public void onResume() {
}


handleIntent();
handleIntent(getIntent());

if (mApp.getDefaultAccountId() == -1)
{
Expand Down Expand Up @@ -436,16 +436,13 @@ private boolean isNetworkAvailable() {
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);

setIntent(intent);

handleIntent();
handleIntent(intent);
}

private void handleIntent ()
private void handleIntent (Intent intent)
{

Intent intent = getIntent();

if (intent != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ public void onCreate(Bundle savedInstanceState) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
applyStyleForToolbar();

Intent intent = getIntent();
processIntent(intent);

collapseToolbar();

getWindow().setSoftInputMode(
Expand Down Expand Up @@ -336,6 +333,9 @@ public void expandToolbar(){
protected void onResume() {
super.onResume();

Intent intent = getIntent();
processIntent(intent);

mConvoView.setSelected(true);

IntentFilter regFilter = new IntentFilter();
Expand Down Expand Up @@ -393,6 +393,7 @@ protected void onPause() {
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);

setIntent(intent);
processIntent(intent);
}

Expand Down

0 comments on commit 0271ee0

Please sign in to comment.