mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
[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:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lunasea/core/constants.dart';
|
||||
|
||||
class SearchConstants {
|
||||
SearchConstants._();
|
||||
@@ -10,5 +11,6 @@ class SearchConstants {
|
||||
'desc': 'Search Newznab Indexers',
|
||||
'icon': Icons.search,
|
||||
'route': '/search',
|
||||
'color': Color(Constants.ACCENT_COLOR),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ class SearchDatabase {
|
||||
|
||||
enum SearchDatabaseValue {
|
||||
NAVIGATION_INDEX,
|
||||
HIDE_XXX,
|
||||
}
|
||||
|
||||
extension SearchDatabaseValueExtension on SearchDatabaseValue {
|
||||
String get key {
|
||||
switch(this) {
|
||||
case SearchDatabaseValue.NAVIGATION_INDEX: return 'SEARCH_NAVIGATION_INDEX';
|
||||
case SearchDatabaseValue.HIDE_XXX: return 'SEARCH_HIDE_XXX';
|
||||
}
|
||||
throw Exception('key not found');
|
||||
}
|
||||
@@ -22,7 +24,10 @@ extension SearchDatabaseValueExtension on SearchDatabaseValue {
|
||||
final _box = Database.lunaSeaBox;
|
||||
switch(this) {
|
||||
case SearchDatabaseValue.NAVIGATION_INDEX: return _box.get(this.key, defaultValue: 0);
|
||||
case SearchDatabaseValue.HIDE_XXX: return _box.get(this.key, defaultValue: false);
|
||||
}
|
||||
throw Exception('data not found');
|
||||
}
|
||||
|
||||
void put(dynamic value) => Database.lunaSeaBox.put(this.key, value);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,9 @@ class _State extends State<SearchCategories> {
|
||||
Widget _list(List<NewznabCategoryData> categories) => categories.length > 0
|
||||
? LSListViewBuilder(
|
||||
itemCount: categories.length,
|
||||
itemBuilder: (context, index) => SearchCategoryTile(category: categories[index], index: index),
|
||||
itemBuilder: (context, index) => SearchDatabaseValue.HIDE_XXX.data && categories[index].name.toLowerCase() == "xxx"
|
||||
? Container()
|
||||
: SearchCategoryTile(category: categories[index], index: index),
|
||||
)
|
||||
: LSGenericMessage(
|
||||
text: 'No Categories Found',
|
||||
|
||||
Reference in New Issue
Block a user