mirror of
https://github.com/stonega/tsacdop
synced 2025-02-17 20:10:37 +01:00
Minor change.
This commit is contained in:
parent
6dd8d37f77
commit
ec9836a432
@ -543,20 +543,6 @@ class ShowEpisode extends StatelessWidget {
|
|||||||
final DBHelper _dbHelper = DBHelper();
|
final DBHelper _dbHelper = DBHelper();
|
||||||
ShowEpisode({Key key, this.episodes, this.podcastLocal}) : super(key: key);
|
ShowEpisode({Key key, this.episodes, this.podcastLocal}) : super(key: key);
|
||||||
|
|
||||||
String _datToString(BuildContext context, {int pubDate}) {
|
|
||||||
final s = context.s;
|
|
||||||
var date = DateTime.fromMillisecondsSinceEpoch(pubDate, isUtc: true);
|
|
||||||
var difference = DateTime.now().toUtc().difference(date);
|
|
||||||
if (difference.inHours < 24) {
|
|
||||||
return s.hoursAgo(difference.inHours);
|
|
||||||
} else if (difference.inDays < 7) {
|
|
||||||
return s.daysAgo(difference.inDays);
|
|
||||||
} else {
|
|
||||||
return DateFormat.yMMMd().format(
|
|
||||||
DateTime.fromMillisecondsSinceEpoch(pubDate, isUtc: true).toLocal());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Tuple5<int, bool, bool, bool, List<int>>> _initData(
|
Future<Tuple5<int, bool, bool, bool, List<int>>> _initData(
|
||||||
EpisodeBrief episode) async {
|
EpisodeBrief episode) async {
|
||||||
final menuList = await _getEpisodeMenu();
|
final menuList = await _getEpisodeMenu();
|
||||||
@ -587,7 +573,7 @@ class ShowEpisode extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> _getTapToOpenPopupMenu() async {
|
Future<bool> _getTapToOpenPopupMenu() async {
|
||||||
var tapToOpenPopupMenuStorage = KeyValueStorage(tapToOpenPopupMenuKey);
|
final tapToOpenPopupMenuStorage = KeyValueStorage(tapToOpenPopupMenuKey);
|
||||||
var boo = await tapToOpenPopupMenuStorage.getInt(defaultValue: 0);
|
var boo = await tapToOpenPopupMenuStorage.getInt(defaultValue: 0);
|
||||||
return boo == 1;
|
return boo == 1;
|
||||||
}
|
}
|
||||||
@ -676,7 +662,7 @@ class ShowEpisode extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final width = context.width;
|
final width = context.width;
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
var audio = Provider.of<AudioPlayerNotifier>(context, listen: false);
|
final audio = Provider.of<AudioPlayerNotifier>(context, listen: false);
|
||||||
return CustomScrollView(
|
return CustomScrollView(
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
primary: false,
|
primary: false,
|
||||||
@ -749,7 +735,7 @@ class ShowEpisode extends StatelessWidget {
|
|||||||
color: context.accentColor,
|
color: context.accentColor,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (data.item1 != episodes[index]) {
|
if (data != episodes[index]) {
|
||||||
audio.episodeLoad(episodes[index]);
|
audio.episodeLoad(episodes[index]);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user