[Release] v3.3.0+330001 (#235)

NEW
- [Home/Calendar] New "schedule" view to view all days as one list
- [Home/Modules] Option to use module "brand" colours or the LunaSea list colours
- [Search] Option to hide adult categories
- [-arr/Catalogue] Ability to sort by date added
- [-arr/Search] Show the indexer/tracker on the collapsed tile

TWEAKS
- [Development] Updated Flutter packages

FIXES
- Multiple smaller crash/error fixes

Thanks to @lightglitch on GitHub for implementing the schedule calendar mode!
This commit is contained in:
Jagandeep Brar
2020-08-16 14:01:11 -05:00
committed by GitHub
parent 0236ba70eb
commit 291db7321f
61 changed files with 528 additions and 139 deletions

View File

@@ -8,7 +8,7 @@ part of 'calendar_starting_day.dart';
class CalendarStartingDayAdapter extends TypeAdapter<CalendarStartingDay> {
@override
final typeId = 12;
final int typeId = 12;
@override
CalendarStartingDay read(BinaryReader reader) {
@@ -58,4 +58,14 @@ class CalendarStartingDayAdapter extends TypeAdapter<CalendarStartingDay> {
break;
}
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is CalendarStartingDayAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@@ -12,6 +12,8 @@ enum CalendarStartingSize {
TWO_WEEKS,
@HiveField(2)
ONE_MONTH,
@HiveField(3)
SCHEDULE,
}
extension CalendarStartingSizeExtension on CalendarStartingSize {
@@ -20,6 +22,7 @@ extension CalendarStartingSizeExtension on CalendarStartingSize {
case CalendarStartingSize.TWO_WEEKS: return CalendarFormat.twoWeeks;
case CalendarStartingSize.ONE_MONTH: return CalendarFormat.month;
case CalendarStartingSize.ONE_WEEK:
case CalendarStartingSize.SCHEDULE:
default: return CalendarFormat.week;
}
}
@@ -28,6 +31,7 @@ extension CalendarStartingSizeExtension on CalendarStartingSize {
switch(this) {
case CalendarStartingSize.TWO_WEEKS: return 'Two Weeks';
case CalendarStartingSize.ONE_MONTH: return 'One Month';
case CalendarStartingSize.SCHEDULE: return 'Schedule';
case CalendarStartingSize.ONE_WEEK:
default: return 'One Week';
}
@@ -37,6 +41,7 @@ extension CalendarStartingSizeExtension on CalendarStartingSize {
switch(this) {
case CalendarStartingSize.TWO_WEEKS: return Icons.photo_size_select_large;
case CalendarStartingSize.ONE_MONTH: return Icons.photo_size_select_actual;
case CalendarStartingSize.SCHEDULE: return Icons.calendar_view_day;
case CalendarStartingSize.ONE_WEEK:
default: return Icons.photo_size_select_small;
}

View File

@@ -8,7 +8,7 @@ part of 'calendar_starting_size.dart';
class CalendarStartingSizeAdapter extends TypeAdapter<CalendarStartingSize> {
@override
final typeId = 13;
final int typeId = 13;
@override
CalendarStartingSize read(BinaryReader reader) {
@@ -19,6 +19,8 @@ class CalendarStartingSizeAdapter extends TypeAdapter<CalendarStartingSize> {
return CalendarStartingSize.TWO_WEEKS;
case 2:
return CalendarStartingSize.ONE_MONTH;
case 3:
return CalendarStartingSize.SCHEDULE;
default:
return null;
}
@@ -36,6 +38,19 @@ class CalendarStartingSizeAdapter extends TypeAdapter<CalendarStartingSize> {
case CalendarStartingSize.ONE_MONTH:
writer.writeByte(2);
break;
case CalendarStartingSize.SCHEDULE:
writer.writeByte(3);
break;
}
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is CalendarStartingSizeAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@@ -18,6 +18,7 @@ enum HomeDatabaseValue {
CALENDAR_ENABLE_LIDARR,
CALENDAR_ENABLE_RADARR,
CALENDAR_ENABLE_SONARR,
MODULES_BRAND_COLOURS,
}
extension HomeDatabaseValueExtension on HomeDatabaseValue {
@@ -29,6 +30,7 @@ extension HomeDatabaseValueExtension on HomeDatabaseValue {
case HomeDatabaseValue.CALENDAR_ENABLE_LIDARR: return 'HOME_CALENDAR_ENABLE_LIDARR';
case HomeDatabaseValue.CALENDAR_ENABLE_RADARR: return 'HOME_CALENDAR_ENABLE_RADARR';
case HomeDatabaseValue.CALENDAR_ENABLE_SONARR: return 'HOME_CALENDAR_ENABLE_SONARR';
case HomeDatabaseValue.MODULES_BRAND_COLOURS: return 'HOME_MODULES_BRAND_COLOURS';
}
throw Exception('key not found');
}
@@ -42,6 +44,7 @@ extension HomeDatabaseValueExtension on HomeDatabaseValue {
case HomeDatabaseValue.CALENDAR_ENABLE_LIDARR: return _box.get(this.key, defaultValue: true);
case HomeDatabaseValue.CALENDAR_ENABLE_RADARR: return _box.get(this.key, defaultValue: true);
case HomeDatabaseValue.CALENDAR_ENABLE_SONARR: return _box.get(this.key, defaultValue: true);
case HomeDatabaseValue.MODULES_BRAND_COLOURS: return _box.get(this.key, defaultValue: false);
}
throw Exception('data not found');
}

View File

@@ -8,4 +8,12 @@ class HomeModel extends ChangeNotifier {
_navigationIndex = navigationIndex;
notifyListeners();
}
bool _showCalendarSchedule = false;
bool get showCalendarSchedule => _showCalendarSchedule;
set showCalendarSchedule(bool showCalendarSchedule) {
assert(showCalendarSchedule != null);
_showCalendarSchedule = showCalendarSchedule;
notifyListeners();
}
}