From f5b8564768be0afa10874dd4771409dd200b614f Mon Sep 17 00:00:00 2001 From: Stonegate Date: Fri, 29 Jan 2021 00:32:21 +0800 Subject: [PATCH] Minor change. --- lib/local_storage/sqflite_localpodcast.dart | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/local_storage/sqflite_localpodcast.dart b/lib/local_storage/sqflite_localpodcast.dart index ece4b4d..fa34803 100644 --- a/lib/local_storage/sqflite_localpodcast.dart +++ b/lib/local_storage/sqflite_localpodcast.dart @@ -285,7 +285,8 @@ class DBHelper { } Future savePodcastLocal(PodcastLocal podcastLocal) async { - var _milliseconds = DateTime.now().millisecondsSinceEpoch; + var milliseconds = DateTime.now().millisecondsSinceEpoch; + print(podcastLocal.imagePath); var dbClient = await database; await dbClient.transaction((txn) async { await txn.rawInsert( @@ -300,7 +301,7 @@ class DBHelper { podcastLocal.primaryColor, podcastLocal.author, podcastLocal.description, - _milliseconds, + milliseconds, podcastLocal.imagePath, podcastLocal.provider, podcastLocal.link, @@ -312,11 +313,18 @@ class DBHelper { podcastLocal.id, podcastLocal.title, podcastLocal.rssUrl, - _milliseconds + milliseconds ]); }); } + Future updatePodcastImage({String id ,String filePath}) async{ + var dbClient = await database; + return await dbClient.rawUpdate( + "UPDATE PodcastLocal SET imagePath= ? WHERE id = ?", + [filePath, id]); + } + Future saveFiresideData(List list) async { var dbClient = await database; var result = await dbClient.rawUpdate(