-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed posts not showing in profile (#739)
- Loading branch information
1 parent
b53a78e
commit f19cebc
Showing
70 changed files
with
2,949 additions
and
1,547 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// InboxRepository+Dependency.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-09-23. | ||
// | ||
import Dependencies | ||
import Foundation | ||
|
||
extension InboxRepository: DependencyKey { | ||
static let liveValue = InboxRepository() | ||
} | ||
|
||
extension DependencyValues { | ||
var inboxRepository: InboxRepository { | ||
get { self[InboxRepository.self] } | ||
set { self[InboxRepository.self] = newValue } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// ContentIdentifiable.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-14. | ||
// | ||
import Foundation | ||
|
||
// TODO: migrate this to be ContentModel and make subtypes of ContentModel for content with URLs, etc. | ||
protocol ContentIdentifiable { | ||
var uid: ContentModelIdentifier { get } | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// LoadingState.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-12. | ||
// | ||
import Foundation | ||
|
||
/// Enum of possible loading states that a tracker can be in. | ||
/// - idle: not currently loading, but more items available to load | ||
/// - loading: currently loading more items | ||
/// - done: no more items available to load | ||
enum LoadingState { | ||
case idle, loading, done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// AssociatedColor.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-31. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
protocol AssociatedColor { | ||
var color: Color? { get } | ||
} |
18 changes: 18 additions & 0 deletions
18
Mlem/Extensions/Tracker Items/Inbox Items/MentionModel+InboxItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// MentionModel+InboxItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-20. | ||
// | ||
|
||
import Foundation | ||
|
||
extension MentionModel: InboxItem { | ||
typealias ParentType = AnyInboxItem | ||
|
||
var published: Date { personMention.published } | ||
|
||
var creatorId: Int { comment.creatorId } | ||
|
||
var read: Bool { personMention.read } | ||
} |
17 changes: 17 additions & 0 deletions
17
Mlem/Extensions/Tracker Items/Inbox Items/MessageModel+InboxItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// MessageModel+InboxItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-16. | ||
// | ||
import Foundation | ||
|
||
extension MessageModel: InboxItem { | ||
typealias ParentType = AnyInboxItem | ||
|
||
var published: Date { privateMessage.published } | ||
|
||
var creatorId: Int { privateMessage.creatorId } | ||
|
||
var read: Bool { privateMessage.read } | ||
} |
17 changes: 17 additions & 0 deletions
17
Mlem/Extensions/Tracker Items/Inbox Items/ReplyModel+InboxItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// ReplyModel+InboxItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-16. | ||
// | ||
import Foundation | ||
|
||
extension ReplyModel: InboxItem { | ||
typealias ParentType = AnyInboxItem | ||
|
||
var published: Date { commentReply.published } | ||
|
||
var creatorId: Int { comment.creatorId } | ||
|
||
var read: Bool { commentReply.read } | ||
} |
17 changes: 17 additions & 0 deletions
17
Mlem/Extensions/Tracker Items/MentionModel+TrackerItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// MentionModel+TrackerItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-31. | ||
// | ||
|
||
import Foundation | ||
|
||
extension MentionModel: TrackerItem { | ||
func sortVal(sortType: TrackerSortType) -> TrackerSortVal { | ||
switch sortType { | ||
case .published: | ||
return .published(personMention.published) | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
Mlem/Extensions/Tracker Items/MessageModel+TrackerItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// MessageModel+TrackerItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-31. | ||
// | ||
|
||
import Foundation | ||
|
||
extension MessageModel: TrackerItem { | ||
func sortVal(sortType: TrackerSortType) -> TrackerSortVal { | ||
switch sortType { | ||
case .published: | ||
return .published(privateMessage.published) | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
Mlem/Extensions/Tracker Items/ReplyModel+TrackerItem.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// ReplyModel+TrackerItem.swift | ||
// Mlem | ||
// | ||
// Created by Eric Andrews on 2023-10-31. | ||
// | ||
|
||
import Foundation | ||
|
||
extension ReplyModel: TrackerItem { | ||
func sortVal(sortType: TrackerSortType) -> TrackerSortVal { | ||
switch sortType { | ||
case .published: | ||
return .published(commentReply.published) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.