mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
bookedit bugfix and hide quik action
This commit is contained in:
@@ -118,25 +118,27 @@ class _BookmarkEditDialog extends State<BookmarkEditDialog> {
|
||||
),
|
||||
));
|
||||
|
||||
list.add(Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Text("Add to quick action"),
|
||||
Expanded(
|
||||
child: Checkbox(
|
||||
value: addedToQa,
|
||||
onChanged: (v) {
|
||||
if (v != null) {
|
||||
setState(() {
|
||||
addedToQa = v;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
if (!PlatformUtil.isPC()) {
|
||||
list.add(Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Text("Add to quick action"),
|
||||
Expanded(
|
||||
child: Checkbox(
|
||||
value: addedToQa,
|
||||
onChanged: (v) {
|
||||
if (v != null) {
|
||||
setState(() {
|
||||
addedToQa = v;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
list.add(Container(
|
||||
margin: EdgeInsets.only(
|
||||
@@ -195,20 +197,22 @@ class _BookmarkEditDialog extends State<BookmarkEditDialog> {
|
||||
await BookmarkDB.update(bookmark);
|
||||
}
|
||||
|
||||
try {
|
||||
var allQas = await BookmarkDB.allQas();
|
||||
List<ShortcutItem> qas = [];
|
||||
for (var bk in allQas) {
|
||||
if (StringUtil.isBlank(bk.title) || StringUtil.isBlank(bk.url)) {
|
||||
continue;
|
||||
}
|
||||
if (!PlatformUtil.isPC()) {
|
||||
try {
|
||||
var allQas = await BookmarkDB.allQas();
|
||||
List<ShortcutItem> qas = [];
|
||||
for (var bk in allQas) {
|
||||
if (StringUtil.isBlank(bk.title) || StringUtil.isBlank(bk.url)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
qas.add(ShortcutItem(
|
||||
type: bk.url!, localizedTitle: bk.title!, icon: 'ic_launcher'));
|
||||
quickActions.setShortcutItems(qas);
|
||||
qas.add(ShortcutItem(
|
||||
type: bk.url!, localizedTitle: bk.title!, icon: 'ic_launcher'));
|
||||
quickActions.setShortcutItems(qas);
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
|
||||
await bookmarkProvider.reload();
|
||||
|
||||
@@ -97,6 +97,7 @@ Future<void> main() async {
|
||||
|
||||
await doInit();
|
||||
|
||||
mediaDataCache = MediaDataCache();
|
||||
await bookmarkProvider.init();
|
||||
|
||||
runApp(MyApp());
|
||||
|
||||
@@ -67,6 +67,8 @@ class _IndexRouter extends CustState<IndexRouter>
|
||||
@override
|
||||
Widget doBuild(BuildContext context) {
|
||||
var themeData = Theme.of(context);
|
||||
mediaDataCache.update(context);
|
||||
|
||||
// if (PlatformUtil.isAndroid()) {
|
||||
// WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
// var intent = await getInitialIntent();
|
||||
|
||||
Reference in New Issue
Block a user