class BackupReminderTooltipManager implements TooltipManager {

    public Maybe<Integer> needToShowBackupReminder() {
        return Maybe.fromCallable(() -> {
                    int prolongationsCount = backupReminderTooltipStorage.getProlongationsCount();
                    int receiptsLimit = NEW_RECEIPTS_LIMIT + NEW_RECEIPTS_LIMIT * prolongationsCount;
                    int daysLimit = DAYS_WITHOUT_BACKUP_LIMIT + DAYS_WITHOUT_BACKUP_LIMIT * prolongationsCount;

                    if (backupProvidersManager.getSyncProvider() == SyncProvider.None && // disabled auto backups
                            backupReminderTooltipStorage.getReceiptsCountWithoutBackup() >= receiptsLimit) { // and user has a lot of new receipts since last backup

                        long lastManualBackupTime = backupReminderTooltipStorage.getLastManualBackupDate().getTime();

                        if (lastManualBackupTime == 0) { // if we didn't track any manual backup yet
                            return NO_PREVIOUS_BACKUPS_DAY;
                        } else {
                            int daysSinceLastManualBackup = (int) TimeUnit.MILLISECONDS.toDays(Math.abs(lastManualBackupTime - System.currentTimeMillis()));
                            return daysSinceLastManualBackup >= daysLimit ? daysSinceLastManualBackup : null;
                        }
                    } else {
                        return null;
                    }
                })
                .subscribeOn(Schedulers.io());
    }

    @Inject public  BackupReminderTooltipManager(@NonNull BackupProvidersManager backupProvidersManager,
                                        @NonNull BackupReminderTooltipStorage backupReminderTooltipStorage);

}