File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Modules/Skypiea/Sources/Skypiea/Protocols Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -82,15 +82,21 @@ extension Cloudable {
8282 throw error
8383 }
8484
85+ let decodedItems = items
86+ . compactMap ( fromRecord ( _: ) )
87+
8588 if let limit = limit {
86- return items
87- . compactMap ( fromRecord ( _: ) )
89+ if decodedItems. count < limit {
90+ return decodedItems
91+ . asArray ( )
92+ }
93+
94+ return decodedItems
8895 . prefix ( upTo: limit)
8996 . asArray ( )
9097 }
9198
92- return items
93- . compactMap ( fromRecord ( _: ) )
99+ return decodedItems
94100 }
95101
96102 /// Finds a record by the given record.
Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ struct TasksScreen: View {
248248 }
249249
250250 private func handleOnAppear( ) {
251- if viewModel. currentSource == . iCloud, !userData. iCloudSyncingIsEnabled {
251+ if viewModel. currentSource == . iCloud,
252+ !userData. iCloudSyncingIsEnabled || !Environment. Features. iCloudSyncing {
252253 viewModel. currentSource = . coreData
253254 }
254255
You can’t perform that action at this time.
0 commit comments