Some fixes
This commit is contained in:
parent
a36b57feb7
commit
09c432414f
|
@ -147,7 +147,7 @@ import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
|||
import static fr.gouv.etalab.mastodon.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.ADD_USER_INTENT;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.BACKUP_INTENT;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.CHANGE_THEME_INTENT;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.BACK_TO_SETTINGS;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.CHANGE_USER_INTENT;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.EXTERNAL_STORAGE_REQUEST_CODE;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.HOME_TIMELINE_INTENT;
|
||||
|
@ -1825,7 +1825,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
toolbarTitle.setText(instance);
|
||||
}else if( extras.getInt(INTENT_ACTION) == HOME_TIMELINE_INTENT){
|
||||
changeUser(BaseMainActivity.this, userIdIntent, true); //Connects the account which is related to the notification
|
||||
}else if( extras.getInt(INTENT_ACTION) == CHANGE_THEME_INTENT){
|
||||
}else if( extras.getInt(INTENT_ACTION) == BACK_TO_SETTINGS){
|
||||
unCheckAllMenuItems(navigationView);
|
||||
navigationView.setCheckedItem(R.id.nav_settings);
|
||||
navigationView.getMenu().performIdentifierAction(R.id.nav_settings, 0);
|
||||
|
|
|
@ -63,7 +63,7 @@ import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
|||
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.CHANGE_THEME_INTENT;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.BACK_TO_SETTINGS;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.INTENT_ACTION;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.SET_YANDEX_API_KEY;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||
|
@ -404,7 +404,7 @@ public class SettingsFragment extends Fragment {
|
|||
if( getActivity() != null)
|
||||
getActivity().recreate();
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
|
||||
if(getActivity() != null)
|
||||
getActivity().finish();
|
||||
startActivity(intent);
|
||||
|
@ -425,7 +425,7 @@ public class SettingsFragment extends Fragment {
|
|||
if( getActivity() != null)
|
||||
getActivity().recreate();
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
|
||||
if(getActivity() != null)
|
||||
getActivity().finish();
|
||||
startActivity(intent);
|
||||
|
@ -624,7 +624,7 @@ public class SettingsFragment extends Fragment {
|
|||
if (getActivity() != null)
|
||||
getActivity().recreate();
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
|
||||
startActivity(intent);
|
||||
}
|
||||
count1++;
|
||||
|
@ -955,7 +955,7 @@ public class SettingsFragment extends Fragment {
|
|||
if( getActivity() != null)
|
||||
getActivity().recreate();
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
||||
intent.putExtra(INTENT_ACTION, BACK_TO_SETTINGS);
|
||||
startActivity(intent);
|
||||
}
|
||||
count3++;
|
||||
|
|
|
@ -239,7 +239,7 @@ public class Helper {
|
|||
//Notifications
|
||||
public static final int NOTIFICATION_INTENT = 1;
|
||||
public static final int HOME_TIMELINE_INTENT = 2;
|
||||
public static final int CHANGE_THEME_INTENT = 3;
|
||||
public static final int BACK_TO_SETTINGS = 3;
|
||||
public static final int CHANGE_USER_INTENT = 4;
|
||||
public static final int ADD_USER_INTENT = 5;
|
||||
public static final int BACKUP_INTENT = 6;
|
||||
|
@ -1447,9 +1447,6 @@ public class Helper {
|
|||
editor.putInt(Helper.SET_THEME, Helper.THEME_LIGHT);
|
||||
editor.apply();
|
||||
activity.recreate();
|
||||
Intent intent = new Intent(activity, MainActivity.class);
|
||||
activity.finish();
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
buttonDark.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -1460,9 +1457,6 @@ public class Helper {
|
|||
editor.putInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
editor.apply();
|
||||
activity.recreate();
|
||||
Intent intent = new Intent(activity, MainActivity.class);
|
||||
activity.finish();
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
buttonBlack.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -1473,9 +1467,6 @@ public class Helper {
|
|||
editor.putInt(Helper.SET_THEME, Helper.THEME_BLACK);
|
||||
editor.apply();
|
||||
activity.recreate();
|
||||
Intent intent = new Intent(activity, MainActivity.class);
|
||||
activity.finish();
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue