Skip to content

Commit

Permalink
紧急修复:搜索历史记录问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dongguaguaguagua committed May 17, 2024
1 parent d37d324 commit e33d1f5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 0 deletions.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/playstore-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions lib/widgets/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'movie_page.dart';
import 'package:tracker/utils/database.dart';
import 'package:tracker/utils/data_function.dart';
import '../utils/fetch_data.dart';

class SearchBarView extends StatefulWidget {
const SearchBarView({super.key});
Expand Down Expand Up @@ -137,8 +138,25 @@ class MovieListCard extends StatelessWidget {
SingleMovie movie;
MovieListCard({super.key, required this.movie});

Future<void> createTables(SingleMovie movie) async {
final media = MyMedia(
tmdbId: movie.tmdbId,
mediaType: "movie",
watchStatus: "unwatched",
watchTimes: 0,
myRating: 0.0,
myReview: '',
);

await ProjectDatabase().SI_add(movie);
await ProjectDatabase().MM_add(media);
await Add_country_runtime_genre(movie);
await addSearchDate(movie);
}

Future<void> addSearchDate(SingleMovie movie) async {
DateTime date = DateTime.now();
print(date);
String query =
"update myTable set searchDate='${date.toString()}' where tmdbId=${movie.tmdbId}";
ProjectDatabase().sudoQuery(query);
Expand Down

0 comments on commit e33d1f5

Please sign in to comment.