Skip to content

Commit e02a346

Browse files
committed
Remove 'unsynced' status from password list and edit password view if storage provider doesn't require syncing.
1 parent 009adb0 commit e02a346

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

Raivo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@
16491649
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
16501650
CODE_SIGN_ENTITLEMENTS = Raivo/Raivo.entitlements;
16511651
CODE_SIGN_STYLE = Automatic;
1652-
CURRENT_PROJECT_VERSION = 84;
1652+
CURRENT_PROJECT_VERSION = 85;
16531653
DEVELOPMENT_TEAM = 564B4ETY69;
16541654
INFOPLIST_FILE = "$(SRCROOT)/Raivo/Supporting/Info.plist";
16551655
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
@@ -1658,7 +1658,7 @@
16581658
"$(inherited)",
16591659
"@executable_path/Frameworks",
16601660
);
1661-
MARKETING_VERSION = 1.4.19;
1661+
MARKETING_VERSION = 1.4.20;
16621662
PRODUCT_BUNDLE_IDENTIFIER = com.finnwea.Raivo.Debug;
16631663
PRODUCT_NAME = "$(TARGET_NAME)";
16641664
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1676,7 +1676,7 @@
16761676
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
16771677
CODE_SIGN_ENTITLEMENTS = Raivo/Raivo.entitlements;
16781678
CODE_SIGN_STYLE = Automatic;
1679-
CURRENT_PROJECT_VERSION = 84;
1679+
CURRENT_PROJECT_VERSION = 85;
16801680
DEVELOPMENT_TEAM = 564B4ETY69;
16811681
INFOPLIST_FILE = "$(SRCROOT)/Raivo/Supporting/Info.plist";
16821682
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
@@ -1685,7 +1685,7 @@
16851685
"$(inherited)",
16861686
"@executable_path/Frameworks",
16871687
);
1688-
MARKETING_VERSION = 1.4.19;
1688+
MARKETING_VERSION = 1.4.20;
16891689
PRODUCT_NAME = "$(TARGET_NAME)";
16901690
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
16911691
SUPPORTS_MACCATALYST = NO;

Raivo/Controllers/Main/MainEditPasswordViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MainEditPasswordViewController: FormViewController {
3737
passwordForm?.counterRow.value = password.counter
3838
passwordForm?.timerRow.value = password.timer
3939

40-
if password.syncing {
40+
if SyncerHelper.shared.getSyncer().recordsRequireSync && password.syncing {
4141
passwordForm?.errorRow.title = "Syncing in progress, but not completed."
4242
passwordForm?.synchronizationSection.hidden = false
4343
passwordForm?.synchronizationSection.evaluateHidden()

Raivo/Migrations/MigrationToBuild60.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,4 @@ class MigrationToBuild60: MigrationProtocol {
7979
// Not implemented
8080
}
8181

82-
/// Migrate the Valet dependency one major version from v3 to v4.
83-
private func migrateValetFromVersion3ToVersion4() {
84-
// migrateObjectsFromAlwaysAccessibleValet(removeOnCompletion:)
85-
}
86-
8782
}

Raivo/Views/UIKit/PasswordCell/CounterBasedPasswordCell/CounterBasedPasswordCell.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class CounterBasedPasswordCell: PasswordCell {
4545
account.text = password.account.count > 0 ? "(" + password.account + ")" : ""
4646
currentPassword.text = TokenHelper.shared.formatPassword(password.getToken())
4747

48-
notSyncedView.isHidden = password.synced || password.syncing
49-
syncingView.isHidden = password.synced || !password.syncing
50-
(!password.synced && password.syncing) ? syncingView.startAnimating() : syncingView.stopAnimating()
48+
notSyncedView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || password.syncing)
49+
syncingView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || !password.syncing)
50+
syncingView.isHidden ? syncingView.stopAnimating() : syncingView.startAnimating()
5151

5252
traitCollectionDidChange(nil)
5353
}
@@ -67,9 +67,9 @@ class CounterBasedPasswordCell: PasswordCell {
6767

6868
currentPassword.text = TokenHelper.shared.formatPassword(password.getToken())
6969

70-
notSyncedView.isHidden = password.synced || password.syncing
71-
syncingView.isHidden = password.synced || !password.syncing
72-
(!password.synced && password.syncing) ? syncingView.startAnimating() : syncingView.stopAnimating()
70+
notSyncedView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || password.syncing)
71+
syncingView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || !password.syncing)
72+
syncingView.isHidden ? syncingView.stopAnimating() : syncingView.startAnimating()
7373
}
7474

7575
}

Raivo/Views/UIKit/PasswordCell/TimeBasedPasswordCell/TimeBasedPasswordCell.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ class TimeBasedPasswordCell: PasswordCell {
6969
currentPassword.text = TokenHelper.shared.formatPassword(password.getToken())
7070
updatePreviousPassword(password)
7171

72-
notSyncedView.isHidden = password.synced || password.syncing
73-
syncingView.isHidden = password.synced || !password.syncing
74-
(!password.synced && password.syncing) ? syncingView.startAnimating() : syncingView.stopAnimating()
72+
notSyncedView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || password.syncing)
73+
syncingView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || !password.syncing)
74+
syncingView.isHidden ? syncingView.stopAnimating() : syncingView.startAnimating()
7575

7676
progressView.transform = CGAffineTransform(rotationAngle: CGFloat.pi)
7777

@@ -105,9 +105,9 @@ class TimeBasedPasswordCell: PasswordCell {
105105
currentPassword.text = TokenHelper.shared.formatPassword(password.getToken())
106106
updatePreviousPassword(password)
107107

108-
notSyncedView.isHidden = password.synced || password.syncing
109-
syncingView.isHidden = password.synced || !password.syncing
110-
(!password.synced && password.syncing) ? syncingView.startAnimating() : syncingView.stopAnimating()
108+
notSyncedView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || password.syncing)
109+
syncingView.isHidden = !SyncerHelper.shared.getSyncer().recordsRequireSync || (password.synced || !password.syncing)
110+
syncingView.isHidden ? syncingView.stopAnimating() : syncingView.startAnimating()
111111

112112
let timer = TimeInterval(password.timer)
113113
let epoch = Date().timeIntervalSince1970

0 commit comments

Comments
 (0)