Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Nov 13, 2023
1 parent 0d0ea6a commit 41749ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/state/models/content/feed-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class FeedSourceModel {
}

get isPinned() {
return this.rootStore.preferences.isPinnedFeed(this.uri)
return false
}

get isLiked() {
Expand Down
18 changes: 2 additions & 16 deletions src/state/models/ui/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
BskyFeedViewPreference,
BskyThreadViewPreference,
} from '@atproto/api'
import AwaitLock from 'await-lock'
import {isObj, hasProp} from 'lib/type-guards'
import {RootStoreModel} from '../root-store'
import {ModerationOpts} from '@atproto/api'
Expand Down Expand Up @@ -33,30 +32,17 @@ export class LabelPreferencesModel {
}

export class PreferencesModel {
adultContentEnabled = false
contentLabels = new LabelPreferencesModel()
savedFeeds: string[] = []
pinnedFeeds: string[] = []
birthDate: Date | undefined = undefined
homeFeed: FeedViewPreference = {
hideReplies: false,
hideRepliesByUnfollowed: false,
hideRepliesByLikeCount: 0,
hideReposts: false,
hideQuotePosts: false,
lab_mergeFeedEnabled: false, // experimental
}
thread: ThreadViewPreference = {
sort: 'oldest',
prioritizeFollowedUsers: true,
lab_treeViewEnabled: false, // experimental
}

// used to linearize async modifications to state
lock = new AwaitLock()

constructor(public rootStore: RootStoreModel) {
makeAutoObservable(this, {lock: false}, {autoBind: true})
makeAutoObservable(this, {}, {autoBind: true})
}

serialize() {
Expand Down Expand Up @@ -106,7 +92,7 @@ export class PreferencesModel {
get moderationOpts(): ModerationOpts {
return {
userDid: this.rootStore.session.currentSession?.did || '',
adultContentEnabled: this.adultContentEnabled,
adultContentEnabled: false,
labels: {
// TEMP translate old settings until this UI can be migrated -prf
porn: tempfixLabelPref(this.contentLabels.nsfw),
Expand Down

0 comments on commit 41749ab

Please sign in to comment.