UI changes

This commit is contained in:
Juan Gilsanz Polo
2024-02-25 13:16:40 +01:00
parent a0b39c3cc8
commit cf13d76a68
2 changed files with 101 additions and 114 deletions

View File

@@ -31,14 +31,16 @@ class BookmarkItem extends ConsumerWidget {
}
}
return ListTile(
return InkWell(
onTap: ref.watch(appStatusProvider).useInAppBrowser == true
? () => ref.watch(routerProvider).push(RoutesPaths.webview, extra: bookmark)
: () => openUrl(bookmark.url!),
isThreeLine: true,
title: Padding(
padding: const EdgeInsets.only(bottom: 4),
child: Row(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
if (ref.watch(appStatusProvider).showFavicon == true)
FutureBuilder(
@@ -95,10 +97,7 @@ class BookmarkItem extends ConsumerWidget {
),
],
),
),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 4),
Text(
validateStrings(bookmark.description, bookmark.websiteDescription),
maxLines: 3,
@@ -142,6 +141,7 @@ class BookmarkItem extends ConsumerWidget {
),
],
),
),
);
}
}

View File

@@ -118,20 +118,7 @@ class BookmarksScreen extends ConsumerWidget {
// Bottom gap for FAB
return const SizedBox(height: 80);
}
final link = bookmarks.bookmarks[index];
return Column(
children: [
BookmarkItem(bookmark: link),
if (index < bookmarks.bookmarks.length - 1)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Divider(
color: Theme.of(context).colorScheme.tertiary.withOpacity(0.3),
),
),
],
);
return BookmarkItem(bookmark: bookmarks.bookmarks[index]);
},
),
],