From 8be47b0ac0d7db0968623a80a62e2dd72c2ea632 Mon Sep 17 00:00:00 2001 From: stonega Date: Sat, 2 Jan 2021 22:51:21 +0800 Subject: [PATCH] Change sub_history. --- lib/local_storage/sqflite_localpodcast.dart | 4 ++-- lib/type/sub_history.dart | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/local_storage/sqflite_localpodcast.dart b/lib/local_storage/sqflite_localpodcast.dart index 37dd196..7741340 100644 --- a/lib/local_storage/sqflite_localpodcast.dart +++ b/lib/local_storage/sqflite_localpodcast.dart @@ -414,11 +414,11 @@ class DBHelper { ORDER BY add_date DESC"""); return list .map((record) => SubHistory( - record['status'] == 0 ? true : false, DateTime.fromMillisecondsSinceEpoch(record['remove_date']), DateTime.fromMillisecondsSinceEpoch(record['add_date']), record['rss_url'], - record['title'])) + record['title'], + status: record['status'] == 0 ? true : false,)) .toList(); } diff --git a/lib/type/sub_history.dart b/lib/type/sub_history.dart index 40a4dee..8525490 100644 --- a/lib/type/sub_history.dart +++ b/lib/type/sub_history.dart @@ -1,3 +1,5 @@ +import 'package:flutter/foundation.dart'; + class SubHistory { /// POdcast subscribe date. DateTime subDate; @@ -14,5 +16,6 @@ class SubHistory { /// POdcast rss link. String rssUrl; - SubHistory(this.status, this.delDate, this.subDate, this.rssUrl, this.title); + SubHistory(this.delDate, this.subDate, this.rssUrl, this.title, + {@required this.status}); }