Feature/BugFix-01 Future Time Progresses (#4)

- Fixed Bug with Future Time Progresses
  Now no longer shows future time progresses in dashboard or in app drawer
- Dashboard Now Shows started and future times.
  These cards are divided based on their count
- Fixed Bug Future Progress In Detail Screen
- Progress Detail Screen Now Shows in how many Days a progress starts
- BugFix App Version

Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
Andreas Fahrecker
2020-12-04 05:15:04 +01:00
committed by GitHub
parent 988e8f3c72
commit 319f539b48
9 changed files with 245 additions and 60 deletions

View File

@ -4,6 +4,20 @@ import 'package:time_progress_tracker/models/time_progress.dart';
List<TimeProgress> timeProgressListSelector(AppState state) =>
state.timeProgressList;
List<TimeProgress> startedTimeProgressesSelector(AppState state) =>
state.timeProgressList
.where((timeProgress) =>
DateTime.now().millisecondsSinceEpoch >=
timeProgress.startTime.millisecondsSinceEpoch)
.toList();
List<TimeProgress> futureTimeProgressesSelector(AppState state) =>
state.timeProgressList
.where((timeProgress) =>
DateTime.now().millisecondsSinceEpoch <
timeProgress.startTime.millisecondsSinceEpoch)
.toList();
TimeProgress timeProgressByIdSelector(AppState state, String id) {
if (state.timeProgressList.length < 1) return null;
return state.timeProgressList