mirror of
https://github.com/stonega/tsacdop
synced 2025-02-18 04:20:37 +01:00
Change shownote fonts.
This commit is contained in:
parent
566ff83530
commit
e004966761
@ -5,7 +5,6 @@ import 'package:flutter/rendering.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_html/flutter_html.dart';
|
import 'package:flutter_html/flutter_html.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:linkify/linkify.dart';
|
import 'package:linkify/linkify.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@ -14,6 +13,7 @@ import 'package:tuple/tuple.dart';
|
|||||||
import '../home/audioplayer.dart';
|
import '../home/audioplayer.dart';
|
||||||
import '../local_storage/sqflite_localpodcast.dart';
|
import '../local_storage/sqflite_localpodcast.dart';
|
||||||
import '../state/audio_state.dart';
|
import '../state/audio_state.dart';
|
||||||
|
import '../state/setting_state.dart';
|
||||||
import '../type/episodebrief.dart';
|
import '../type/episodebrief.dart';
|
||||||
import '../type/play_histroy.dart';
|
import '../type/play_histroy.dart';
|
||||||
import '../util/audiopanel.dart';
|
import '../util/audiopanel.dart';
|
||||||
@ -436,11 +436,8 @@ class __MenuBarState extends State<_MenuBar> {
|
|||||||
|
|
||||||
Future<void> _markListened(EpisodeBrief episode) async {
|
Future<void> _markListened(EpisodeBrief episode) async {
|
||||||
var dbHelper = DBHelper();
|
var dbHelper = DBHelper();
|
||||||
//var marked = await dbHelper.checkMarked(episode);
|
|
||||||
//if (!marked) {
|
|
||||||
final history = PlayHistory(episode.title, episode.enclosureUrl, 0, 1);
|
final history = PlayHistory(episode.title, episode.enclosureUrl, 0, 1);
|
||||||
await dbHelper.saveHistory(history);
|
await dbHelper.saveHistory(history);
|
||||||
//}
|
|
||||||
if (mounted) setState(() {});
|
if (mounted) setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -739,29 +736,28 @@ class _ShowNote extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Html(
|
return Selector<SettingState, TextStyle>(
|
||||||
padding:
|
selector: (_, settings) => settings.showNoteFontStyle,
|
||||||
EdgeInsets.only(left: 20.0, right: 20, bottom: 50),
|
builder: (_, data, __) => Html(
|
||||||
defaultTextStyle: GoogleFonts.martel(
|
padding:
|
||||||
textStyle: TextStyle(
|
EdgeInsets.only(left: 20.0, right: 20, bottom: 50),
|
||||||
height: 1.8,
|
defaultTextStyle: data,
|
||||||
),
|
data: description,
|
||||||
),
|
linkStyle: TextStyle(
|
||||||
data: description,
|
color: context.accentColor,
|
||||||
linkStyle: TextStyle(
|
textBaseline: TextBaseline.ideographic),
|
||||||
color: context.accentColor,
|
onLinkTap: (url) {
|
||||||
textBaseline: TextBaseline.ideographic),
|
if (url.substring(0, 3) == '#t=') {
|
||||||
onLinkTap: (url) {
|
final seconds = _getTimeStamp(url);
|
||||||
if (url.substring(0, 3) == '#t=') {
|
if (data == episode) {
|
||||||
final seconds = _getTimeStamp(url);
|
audio.seekTo(seconds * 1000);
|
||||||
if (data == episode) {
|
}
|
||||||
audio.seekTo(seconds * 1000);
|
} else {
|
||||||
|
url.launchUrl;
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
url.launchUrl;
|
useRichText: true,
|
||||||
}
|
),
|
||||||
},
|
|
||||||
useRichText: true,
|
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: Container(
|
: Container(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user