Changed name of button to snooze if it's staleDataAlarm

This commit is contained in:
RoumenGeorgiev 2017-08-04 16:43:46 +03:00 committed by GitHub
parent 714a292d78
commit aff62d86b1

View file

@ -746,14 +746,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
public void run() {
scheduleUpdateGUI("refreshLoop");
sLoopHandler.postDelayed(sRefreshLoop, 60 * 1000L);
// Added by Rumen for STALE DATA ALARM
boolean isThereStaleData = Notification.isAlarmForStaleData();
log.debug("isThereIsStaleData: "+isThereStaleData);
if(isThereStaleData){
Notification notification = new Notification(Notification.NSALARM, getString(R.string.nsalarm_staledata), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
}
// end of insert
}
};
sLoopHandler.postDelayed(sRefreshLoop, 60 * 1000L);
@ -1764,6 +1756,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
public void onBindViewHolder(NotificationsViewHolder holder, int position) {
Notification notification = notificationsList.get(position);
holder.dismiss.setTag(notification);
if(notification.text == MainApp.sResources.getString(R.string.nsalarm_staledata))
holder.dismiss.setText("snooze");
holder.text.setText(notification.text);
holder.time.setText(DateUtil.timeString(notification.date));
if (notification.level == Notification.URGENT)