Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite Loading Inbox #1478

Merged
merged 21 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Mlem/App/Views/Root/Tabs/Inbox/InboxView+Views.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,6 @@
import SwiftUI

extension InboxView {

@ViewBuilder
var allItemsView: some View {
ForEach(inboxFeedLoader.items, id: \.actorId) { item in
Group {
switch item {
case let .message(message):
MessageView(message: message)
case let .reply(reply):
ReplyView(reply: reply)
}
}
.padding([.horizontal, .bottom], Constants.main.standardSpacing)
.onAppear {
do {
try inboxFeedLoader.loadIfThreshold(item)
} catch {
handleError(error)
}
}
}

EndOfFeedView(loadingState: feedLoader.loadingState, loadMore: nil, viewType: .cartoon)
}

@ViewBuilder
var sectionHeader: some View {
BubblePicker(
Expand Down
7 changes: 7 additions & 0 deletions Mlem/App/Views/Shared/EndOfFeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ enum EndOfFeedViewType {

struct EndOfFeedView: View {
@Environment(Palette.self) var palette
@Setting(\.developerMode) var developerMode

let loadingState: LoadingState
let loadMore: (() -> Void)?
Expand All @@ -45,6 +46,12 @@ struct EndOfFeedView: View {
loadMore()
}
.buttonStyle(.bordered)
} else {
if developerMode {
Text("IDLE")
EricBAndrews marked this conversation as resolved.
Show resolved Hide resolved
} else {
ProgressView()
}
}
case .loading:
ProgressView()
Expand Down
3 changes: 3 additions & 0 deletions Mlem/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@
},
"I think I've found the bottom!" : {

},
"IDLE" : {

EricBAndrews marked this conversation as resolved.
Show resolved Hide resolved
},
"If an instance is \"guaranteed\", it is known as definitely not spam. Unguaranteed instances are not necessarily spam; rather, it is unknown whether a non-guaranteed instance is spam or not.\n\nAn instance can be guaranteed by any other guaranteed instance. This forms a chain of guaranteed instances known as the \"Chain of Trust\". The Chain of Trust starts at the Fediseer itself, which guarantees several of the largest instances.\n\nA guarantee can be revoked by the guarantor at any time. If an instance's guarantee is revoked, it returns to a \"not guaranteed\" state along with any instances it guarantees.\n\nOnce an instance has been guaranteed, it is able to express its approval or disapproval of other instances using endorsements, hesitations and censures." : {

Expand Down
Loading