Skip to content

Commit e79c878

Browse files
authored
Add chat list banner for backup attachment download progress
1 parent 32a2c55 commit e79c878

File tree

23 files changed

+1040
-28
lines changed

23 files changed

+1040
-28
lines changed

Signal.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,7 @@
11991199
66F98DE22DB71220009F1A86 /* DeviceBatteryLevelManagerImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F98DE12DB71219009F1A86 /* DeviceBatteryLevelManagerImpl.swift */; };
12001200
66F98DE62DBBED6C009F1A86 /* LineWrappingStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F98DE52DBBED68009F1A86 /* LineWrappingStackView.swift */; };
12011201
66F98DE82DBBF25A009F1A86 /* LineWrappingStackViewTestController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F98DE72DBBF24F009F1A86 /* LineWrappingStackViewTestController.swift */; };
1202+
66F98DEA2DC53155009F1A86 /* ChatListViewController+BackupProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F98DE92DC5314E009F1A86 /* ChatListViewController+BackupProgressView.swift */; };
12021203
66FA2B1D28CB0DE1006845CD /* PaymentsBiometryLockPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FA2B1C28CB0DE1006845CD /* PaymentsBiometryLockPromptViewController.swift */; };
12031204
66FBC4E128DA820900BD9E8B /* MyStorySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FBC4E028DA820900BD9E8B /* MyStorySettingsViewController.swift */; };
12041205
66FBC4E328DA82AA00BD9E8B /* SelectMyStoryRecipientsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FBC4E228DA82AA00BD9E8B /* SelectMyStoryRecipientsViewController.swift */; };
@@ -5112,6 +5113,7 @@
51125113
66F98DE12DB71219009F1A86 /* DeviceBatteryLevelManagerImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceBatteryLevelManagerImpl.swift; sourceTree = "<group>"; };
51135114
66F98DE52DBBED68009F1A86 /* LineWrappingStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineWrappingStackView.swift; sourceTree = "<group>"; };
51145115
66F98DE72DBBF24F009F1A86 /* LineWrappingStackViewTestController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineWrappingStackViewTestController.swift; sourceTree = "<group>"; };
5116+
66F98DE92DC5314E009F1A86 /* ChatListViewController+BackupProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ChatListViewController+BackupProgressView.swift"; sourceTree = "<group>"; };
51155117
66FA2B1C28CB0DE1006845CD /* PaymentsBiometryLockPromptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentsBiometryLockPromptViewController.swift; sourceTree = "<group>"; };
51165118
66FA2B1E28CBA4A5006845CD /* DeviceOwnerAuthenticationType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceOwnerAuthenticationType.swift; sourceTree = "<group>"; };
51175119
66FBC4E028DA820900BD9E8B /* MyStorySettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyStorySettingsViewController.swift; sourceTree = "<group>"; };
@@ -10604,6 +10606,7 @@
1060410606
50101FB32B08447000C648E4 /* ChatListProxyButtonCreator.swift */,
1060510607
50101FB12B083C8100C648E4 /* ChatListSettingsButtonState.swift */,
1060610608
34E95C26269F6095004807EC /* ChatListViewController+Actions.swift */,
10609+
66F98DE92DC5314E009F1A86 /* ChatListViewController+BackupProgressView.swift */,
1060710610
76847C932A13416A008E2EAB /* ChatListViewController+Camera.swift */,
1060810611
34E95C28269F6109004807EC /* ChatListViewController+Helpers.swift */,
1060910612
34E95C2C26A0673F004807EC /* ChatListViewController+Loading.swift */,
@@ -16725,6 +16728,7 @@
1672516728
50101FB42B08447000C648E4 /* ChatListProxyButtonCreator.swift in Sources */,
1672616729
50101FB22B083C8100C648E4 /* ChatListSettingsButtonState.swift in Sources */,
1672716730
34E95C27269F6096004807EC /* ChatListViewController+Actions.swift in Sources */,
16731+
66F98DEA2DC53155009F1A86 /* ChatListViewController+BackupProgressView.swift in Sources */,
1672816732
76847C942A13416A008E2EAB /* ChatListViewController+Camera.swift in Sources */,
1672916733
34E95C29269F6109004807EC /* ChatListViewController+Helpers.swift in Sources */,
1673016734
34E95C2D26A06740004807EC /* ChatListViewController+Loading.swift in Sources */,

Signal/Registration/UserInterface/RegistrationEnterBackupKeyViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ class RegistrationEnterBackupKeyViewController: OWSViewController, OWSNavigation
109109
primaryButton: .init(title: OWSLocalizedString(
110110
"REGISTRATION_NO_BACKUP_KEY_SKIP_RESTORE_BUTTON_TITLE",
111111
comment: "Title for button on sheet for when you don't have a backup key"
112-
)) { [weak self] in
112+
)) { [weak self] _ in
113113
// [Backups] TODO: Implement
114114
self?.dismiss(animated: true)
115115
},
116-
secondaryButton: .init(title: CommonStrings.learnMore) { [weak self] in
116+
secondaryButton: .init(title: CommonStrings.learnMore) { [weak self] _ in
117117
// [Backups] TODO: Implement
118118
self?.dismiss(animated: true)
119119
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "backup-bold.pdf",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "backup-error-bold.pdf",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "backup-error-display-bold.pdf",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}

Signal/src/ViewControllers/AppSettings/Linked Devices/LinkedDevicesView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ class LinkedDevicesHostingController: HostingContainer<LinkedDevicesView> {
598598
),
599599
primaryButton: .init(
600600
title: CommonStrings.continueButton
601-
) { [weak self, context] in
601+
) { [weak self, context] _ in
602602
self?.dismiss(animated: true)
603603
Task {
604604
await self?.authenticateThenShowLinkNewDeviceView(context: context)

Signal/src/ViewControllers/HomeView/Chat List/CLVRenderState.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,15 @@ struct CLVRenderState {
7575
)
7676

7777
case .reminders where hasVisibleReminders,
78+
.backupProgressView where shouldBackupProgressViewBeVisible,
7879
.archiveButton where hasArchivedThreadsRow:
7980
return Section(type: sectionType)
8081

8182
case .inboxFilterFooter:
8283
guard let inboxFilterSection else { return nil }
8384
return Section(type: sectionType, value: inboxFilterSection)
8485

85-
case .reminders, .archiveButton:
86+
case .reminders, .backupProgressView, .archiveButton:
8687
return nil
8788
}
8889
}
@@ -103,11 +104,15 @@ struct CLVRenderState {
103104
viewInfo.hasVisibleReminders
104105
}
105106

107+
var shouldBackupProgressViewBeVisible: Bool {
108+
viewInfo.shouldBackupProgressViewBeVisible
109+
}
110+
106111
// MARK: UITableViewDataSource
107112

108113
func numberOfRows(in section: Section) -> Int {
109114
switch section.type {
110-
case .reminders, .archiveButton, .inboxFilterFooter:
115+
case .reminders, .backupProgressView, .archiveButton, .inboxFilterFooter:
111116
return 1
112117
case .pinned:
113118
return pinnedThreadUniqueIds.count
@@ -125,7 +130,7 @@ struct CLVRenderState {
125130
let oldValue = renderState.items(in: section) ?? []
126131
return items.difference(from: oldValue)
127132

128-
case .pinned, .unpinned, .reminders, .archiveButton:
133+
case .pinned, .unpinned, .reminders, .backupProgressView, .archiveButton:
129134
return nil
130135
}
131136
}
@@ -139,7 +144,7 @@ struct CLVRenderState {
139144
return nil
140145
}
141146

142-
case .pinned, .unpinned, .reminders, .archiveButton:
147+
case .pinned, .unpinned, .reminders, .backupProgressView, .archiveButton:
143148
owsFailDebug("Section diffing not yet supported in section '\(section.type)'")
144149
return nil
145150
}

0 commit comments

Comments
 (0)