Skip to content

Commit

Permalink
Refactor My Feeds (#1877)
Browse files Browse the repository at this point in the history
* Refactor My Feeds screen

* Remove unused feed UI models

* Add back PTR
  • Loading branch information
estrattonbailey authored Nov 13, 2023
1 parent d9e0a92 commit c584a33
Show file tree
Hide file tree
Showing 5 changed files with 531 additions and 541 deletions.
6 changes: 0 additions & 6 deletions src/state/models/me.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
} from '@atproto/api'
import {RootStoreModel} from './root-store'
import {NotificationsFeedModel} from './feeds/notifications'
import {MyFeedsUIModel} from './ui/my-feeds'
import {MyFollowsCache} from './cache/my-follows'
import {isObj, hasProp} from 'lib/type-guards'
import {logger} from '#/logger'
Expand All @@ -22,7 +21,6 @@ export class MeModel {
followsCount: number | undefined
followersCount: number | undefined
notifications: NotificationsFeedModel
myFeeds: MyFeedsUIModel
follows: MyFollowsCache
invites: ComAtprotoServerDefs.InviteCode[] = []
appPasswords: ComAtprotoServerListAppPasswords.AppPassword[] = []
Expand All @@ -40,13 +38,11 @@ export class MeModel {
{autoBind: true},
)
this.notifications = new NotificationsFeedModel(this.rootStore)
this.myFeeds = new MyFeedsUIModel(this.rootStore)
this.follows = new MyFollowsCache(this.rootStore)
}

clear() {
this.notifications.clear()
this.myFeeds.clear()
this.follows.clear()
this.rootStore.profiles.cache.clear()
this.rootStore.posts.cache.clear()
Expand Down Expand Up @@ -113,8 +109,6 @@ export class MeModel {
error: e,
})
})
this.myFeeds.clear()
/* dont await */ this.myFeeds.saved.refresh()
this.rootStore.emitSessionLoaded()
await this.fetchInviteCodes()
await this.fetchAppPasswords()
Expand Down
182 changes: 0 additions & 182 deletions src/state/models/ui/my-feeds.ts

This file was deleted.

122 changes: 0 additions & 122 deletions src/state/models/ui/saved-feeds.ts

This file was deleted.

Loading

0 comments on commit c584a33

Please sign in to comment.