From f8a64005f26a07adcd69e901fa6641567a216426 Mon Sep 17 00:00:00 2001 From: ice-ajax <190340101+ice-ajax@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:19:56 +0100 Subject: [PATCH] chore: remove stories type bookmarks (#519) ## Description Removes stories type bookmark set, as there are going to be no bookmarking feature for stories ## Additional Notes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Refactoring - [ ] Documentation - [x] Chore ## Screenshots (if applicable) --- .../features/feed/data/models/bookmarks/bookmarks_set.c.dart | 2 +- lib/app/features/feed/data/models/entities/post_data.c.dart | 2 -- lib/app/features/feed/providers/bookmarks_notifier.c.dart | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/app/features/feed/data/models/bookmarks/bookmarks_set.c.dart b/lib/app/features/feed/data/models/bookmarks/bookmarks_set.c.dart index c193c8f1a..523465576 100644 --- a/lib/app/features/feed/data/models/bookmarks/bookmarks_set.c.dart +++ b/lib/app/features/feed/data/models/bookmarks/bookmarks_set.c.dart @@ -14,7 +14,7 @@ import 'package:nostr_dart/nostr_dart.dart'; part 'bookmarks_set.c.freezed.dart'; -enum BookmarksSetType { posts, stories, videos, articles, unknown } +enum BookmarksSetType { posts, videos, articles, unknown } @Freezed(equal: false) class BookmarksSetEntity with _$BookmarksSetEntity, NostrEntity implements CacheableEntity { diff --git a/lib/app/features/feed/data/models/entities/post_data.c.dart b/lib/app/features/feed/data/models/entities/post_data.c.dart index a631f7d41..ae601e43c 100644 --- a/lib/app/features/feed/data/models/entities/post_data.c.dart +++ b/lib/app/features/feed/data/models/entities/post_data.c.dart @@ -169,8 +169,6 @@ class PostData with _$PostData, EntityMediaDataMixin implements EventSerializabl return replyId ?? rootReplyId; } - bool get isStory => expiration != null; - bool get hasVideo => media.values.any((media) => media.mediaType == MediaType.video); } diff --git a/lib/app/features/feed/providers/bookmarks_notifier.c.dart b/lib/app/features/feed/providers/bookmarks_notifier.c.dart index d9c83770e..2472e2ff6 100644 --- a/lib/app/features/feed/providers/bookmarks_notifier.c.dart +++ b/lib/app/features/feed/providers/bookmarks_notifier.c.dart @@ -153,7 +153,6 @@ class BookmarksNotifier extends _$BookmarksNotifier { BookmarksSetType? _getBookmarkType(NostrEntity entity) { return switch (entity) { ArticleEntity() => BookmarksSetType.articles, - PostEntity(data: PostData(isStory: true)) => BookmarksSetType.stories, PostEntity(data: PostData(hasVideo: true)) => BookmarksSetType.videos, PostEntity() => BookmarksSetType.posts, _ => null,