Skip to content

Commit

Permalink
Merge pull request #527 from shikoko/ANDROID-688
Browse files Browse the repository at this point in the history
ANDROID-688 Disable my.alfresco.com notification until a proper shutdown date is picked
  • Loading branch information
shikoko authored Jan 8, 2019
2 parents eed0fe8 + c85cefb commit db89d8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,18 @@ public void onResume()
checkSession();

//TODO remove in the future
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
int alertStatus = prefs.getInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, -1);
// if the alert status is 1 (needs to be shown) or -1 (has never been set)
if ((alertStatus == -1 && getCurrentSession() instanceof CloudSession) || alertStatus == 0) {
prefs.edit().putInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, 1).apply();
new AlertDialog.Builder(this)
.setTitle(getResources().getString(R.string.alert_cloud_shutting_down_title))
.setMessage(getResources().getString(R.string.alert_cloud_shutting_down_content))
.setPositiveButton("OK", null)
.create()
.show();
}
// SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
// int alertStatus = prefs.getInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, -1);
// // if the alert status is 1 (needs to be shown) or -1 (has never been set)
// if ((alertStatus == -1 && getCurrentSession() instanceof CloudSession) || alertStatus == 0) {
// prefs.edit().putInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, 1).apply();
// new AlertDialog.Builder(this)
// .setTitle(getResources().getString(R.string.alert_cloud_shutting_down_title))
// .setMessage(getResources().getString(R.string.alert_cloud_shutting_down_content))
// .setPositiveButton("OK", null)
// .create()
// .show();
// }

if (getFragment(MainMenuFragment.TAG) != null && requestSwapAccount)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ public void onAccountCreated(CreateAccountEvent event)
}

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
SharedPreferences.Editor editor = prefs.edit();
editor.putInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, 0).apply();
// SharedPreferences.Editor editor = prefs.edit();
// editor.putInt(GeneralPreferences.HAS_SHOWN_SHUTTING_DOWN_ALERT, 0).apply();

if (getActivity() instanceof WelcomeActivity)
{
Expand Down

0 comments on commit db89d8b

Please sign in to comment.