Skip to content

Commit

Permalink
chore: remove stories type bookmarks (#519)
Browse files Browse the repository at this point in the history
## Description
Removes stories type bookmark set, as there are going to be no
bookmarking feature for stories

## Additional Notes
<!-- Add any extra context or relevant information here. -->

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Refactoring
- [ ] Documentation
- [x] Chore

## Screenshots (if applicable)
<!-- Include screenshots to demonstrate any UI changes. -->
<!-- <img width="180" alt="image" src="image_url_here"> -->
  • Loading branch information
ice-ajax authored Jan 8, 2025
1 parent a80df02 commit f8a6400
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions lib/app/features/feed/data/models/entities/post_data.c.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion lib/app/features/feed/providers/bookmarks_notifier.c.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f8a6400

Please sign in to comment.