This repository was archived by the owner on Apr 3, 2025. It is now read-only.
File tree 3 files changed +4
-26
lines changed
dashboard/routes/dashboard/widgets
settings/routes/configuration_dashboard/pages
3 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ enum DashboardDatabase<T> with LunaTableMixin<T> {
13
13
CALENDAR_ENABLE_RADARR <bool >(true ),
14
14
CALENDAR_ENABLE_SONARR <bool >(true ),
15
15
CALENDAR_DAYS_PAST <int >(14 ),
16
- CALENDAR_DAYS_FUTURE <int >(14 ),
17
- CALENDAR_SHOW_PAST_DAYS <bool >(false );
16
+ CALENDAR_DAYS_FUTURE <int >(14 );
18
17
19
18
@override
20
19
LunaTable get table => LunaTable .dashboard;
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
- import 'package:lunasea/database/tables/dashboard.dart' ;
3
2
import 'package:lunasea/extensions/scroll_controller.dart' ;
4
3
import 'package:lunasea/vendor.dart' ;
5
4
@@ -63,18 +62,12 @@ class _State extends State<ScheduleView> {
63
62
64
63
for (final key in keys) {
65
64
final selected = context.read <ModuleState >().selected;
66
- final today = context.read <ModuleState >().today;
67
-
68
- bool pastDays = DashboardDatabase .CALENDAR_SHOW_PAST_DAYS .read ();
69
- bool dayInFuture = key.isAfter (today.subtract (const Duration (days: 1 )));
70
- bool hasEvents = widget.events[key]? .isNotEmpty ?? false ;
71
- bool isSelected = selected.isAtSameMomentAs (key);
72
-
73
- if (isSelected) {
65
+ if (selected.isAtSameMomentAs (key)) {
74
66
offsetOfSelected = offset;
75
67
}
76
68
77
- if ((pastDays || dayInFuture) && hasEvents) {
69
+ final hasEvents = widget.events[key]? .isNotEmpty ?? false ;
70
+ if (hasEvents) {
78
71
final built = _buildDay (key);
79
72
offset += built.item2;
80
73
days.addAll (built.item1);
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ class _State extends State<ConfigurationDashboardCalendarRoute>
45
45
children: [
46
46
_futureDays (),
47
47
_pastDays (),
48
- _pastDaysInSchedule (),
49
48
LunaDivider (),
50
49
_startingDay (),
51
50
_startingSize (),
@@ -58,19 +57,6 @@ class _State extends State<ConfigurationDashboardCalendarRoute>
58
57
);
59
58
}
60
59
61
- Widget _pastDaysInSchedule () {
62
- const _db = DashboardDatabase .CALENDAR_SHOW_PAST_DAYS ;
63
- return _db.listenableBuilder (
64
- builder: (context, _) => LunaBlock (
65
- title: 'settings.PastDaysInScheduleView' .tr (),
66
- trailing: LunaSwitch (
67
- value: _db.read (),
68
- onChanged: _db.update,
69
- ),
70
- ),
71
- );
72
- }
73
-
74
60
Widget _pastDays () {
75
61
const _db = DashboardDatabase .CALENDAR_DAYS_PAST ;
76
62
return _db.listenableBuilder (
You can’t perform that action at this time.
0 commit comments