1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-22 19:08:03 +01:00

Removed newNotificationSnackbar

This commit is contained in:
vanitasvitae 2016-09-20 21:44:43 +02:00
parent adff9667af
commit a086923804

View file

@ -139,7 +139,6 @@ public class MainActivity extends AppCompatActivity
private OpenExternalLinkReceiver brOpenExternalLink;
private BroadcastReceiver brSetTitle;
private Snackbar snackbarExitApp;
private Snackbar snackbarNewNotification;
private Snackbar snackbarNoInternet;
private String textToBeShared = null;
@ -266,18 +265,6 @@ public class MainActivity extends AppCompatActivity
moveTaskToBack(true);
}
});
snackbarNewNotification = Snackbar
.make(contentLayout, R.string.new_notifications, Snackbar.LENGTH_LONG)
.setAction(android.R.string.yes, new View.OnClickListener() {
@Override
public void onClick(View view) {
if (WebHelper.isOnline(MainActivity.this)) {
webView.loadUrlNew(urls.getNotificationsUrl());
} else {
Snackbar.make(contentLayout, R.string.no_internet, Snackbar.LENGTH_LONG).show();
}
}
});
snackbarNoInternet = Snackbar.make(contentLayout, R.string.no_internet, Snackbar.LENGTH_LONG);
// Load app settings
@ -1082,11 +1069,6 @@ public class MainActivity extends AppCompatActivity
AppLog.i(this, "onNotificationCountChanged()");
// Count saved in PodUserProfile
invalidateOptionsMenu();
if (notificationCount > 0 && !snackbarNewNotification.isShown()
&& !webView.getUrl().equals(urls.getNotificationsUrl())) {
snackbarNewNotification.show();
}
}
// TODO: Move from Javascript interface
@ -1095,10 +1077,6 @@ public class MainActivity extends AppCompatActivity
AppLog.i(this, "onUnreadMessageCountChanged()");
// Count saved in PodUserProfile
invalidateOptionsMenu();
if (unreadMessageCount > 0 && !snackbarNewNotification.isShown()
&& !webView.getUrl().equals(urls.getNotificationsUrl())) {
snackbarNewNotification.show();
}
}
private class JavaScriptInterface {