Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
femalemonkeyman committed May 8, 2023
2 parents 48cae3d + d3e6178 commit 9d9e7e3
Show file tree
Hide file tree
Showing 6 changed files with 1,155 additions and 60 deletions.
20 changes: 9 additions & 11 deletions lib/anime/anime.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ class AniPageState extends State<AniPage> with AutomaticKeepAliveClientMixin {
page = 1;
animeData = [];
if (textController.text.isNotEmpty) {
print(textController.text);
selectedGenres = [];
search = textController.text;
} else {
Expand Down Expand Up @@ -185,16 +184,15 @@ class AniPageState extends State<AniPage> with AutomaticKeepAliveClientMixin {
label: Text(
genresList[index],
),
onSelected: (value) async {
if (value) {
selectedGenres.add(genresList[index]);
} else {
selectedGenres.remove(genresList[index]);
}
setState(
() {},
);
},
onSelected: (value) => setState(
() {
if (value) {
selectedGenres.add(genresList[index]);
} else {
selectedGenres.remove(genresList[index]);
}
},
),
);
},
),
Expand Down
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ void main() async {
MediaKit.ensureInitialized();
final dir = await getApplicationDocumentsDirectory();
Isar.openSync(
[AniDataSchema],
[AniDataSchema, MediaSchema],
name: "later",
directory: dir.path,
directory: '${dir.path}/.anicross',
);
Isar.openSync(
[AniDataSchema],
name: "novels",
directory: dir.path,
directory: '${dir.path}/.anicross',
);
runApp(
MaterialApp.router(
Expand Down
17 changes: 17 additions & 0 deletions lib/models/info_models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,20 @@ class AniData {
this.tags,
});
}

@collection
class Media {
final Id id = Isar.autoIncrement;
final String name;
final String number;
final List<String> sources;
bool watched;
String? position;

Media({
required this.name,
required this.number,
required this.sources,
this.watched = false,
});
}
Loading

0 comments on commit 9d9e7e3

Please sign in to comment.