clean with constants

pull/1023/head
Ryan ZHAO 8 months ago
parent 1e1d71f788
commit 7764f7f3f6

@ -201,7 +201,7 @@
9473386E2BDF5F3E00B9E169 /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 9473386D2BDF5F3E00B9E169 /* InfoPlist.xcstrings */; }; 9473386E2BDF5F3E00B9E169 /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 9473386D2BDF5F3E00B9E169 /* InfoPlist.xcstrings */; };
94B3DC172AF8592200C88531 /* QuoteView_SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94B3DC162AF8592200C88531 /* QuoteView_SwiftUI.swift */; }; 94B3DC172AF8592200C88531 /* QuoteView_SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94B3DC162AF8592200C88531 /* QuoteView_SwiftUI.swift */; };
94C5DCB02BE88170003AA8C5 /* BezierPathView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C5DCAF2BE88170003AA8C5 /* BezierPathView.swift */; }; 94C5DCB02BE88170003AA8C5 /* BezierPathView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C5DCAF2BE88170003AA8C5 /* BezierPathView.swift */; };
94FC7A8E2C759805004A8146 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FC7A8D2C759805004A8146 /* Constants.swift */; }; 94FC7A8F2C759F47004A8146 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FC7A8D2C759805004A8146 /* Constants.swift */; };
A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; }; A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; };
A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A163E8AA16F3F6A90094D68B /* Security.framework */; }; A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A163E8AA16F3F6A90094D68B /* Security.framework */; };
A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; }; A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; };
@ -2740,6 +2740,7 @@
B8A582B0258C66C900AFD84C /* General */ = { B8A582B0258C66C900AFD84C /* General */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
94FC7A8D2C759805004A8146 /* Constants.swift */,
FD428B182B4B576F006D0888 /* AppContext.swift */, FD428B182B4B576F006D0888 /* AppContext.swift */,
7BD477A727EC39F5004E2822 /* Atomic.swift */, 7BD477A727EC39F5004E2822 /* Atomic.swift */,
FDC438CC27BC641200C60D73 /* Set+Utilities.swift */, FDC438CC27BC641200C60D73 /* Set+Utilities.swift */,
@ -3543,7 +3544,6 @@
children = ( children = (
C3AAFFF125AE99710089E6DD /* AppDelegate.swift */, C3AAFFF125AE99710089E6DD /* AppDelegate.swift */,
34D99CE3217509C1000AFB39 /* AppEnvironment.swift */, 34D99CE3217509C1000AFB39 /* AppEnvironment.swift */,
94FC7A8D2C759805004A8146 /* Constants.swift */,
7BFD1A952747689000FB91B9 /* TurnServers */, 7BFD1A952747689000FB91B9 /* TurnServers */,
B8FF8E6025C10D8B004D1F22 /* Countries */, B8FF8E6025C10D8B004D1F22 /* Countries */,
34330A581E7875FB00DF2FB9 /* Fonts */, 34330A581E7875FB00DF2FB9 /* Fonts */,
@ -6073,6 +6073,7 @@
FD428B192B4B576F006D0888 /* AppContext.swift in Sources */, FD428B192B4B576F006D0888 /* AppContext.swift in Sources */,
C32C5D83256DD5B6003C73A2 /* SSKKeychainStorage.swift in Sources */, C32C5D83256DD5B6003C73A2 /* SSKKeychainStorage.swift in Sources */,
FD559DF52A7368CB00C7C62A /* DispatchQueue+Utilities.swift in Sources */, FD559DF52A7368CB00C7C62A /* DispatchQueue+Utilities.swift in Sources */,
94FC7A8F2C759F47004A8146 /* Constants.swift in Sources */,
FDF8488329405A12007DCAE5 /* BatchResponse.swift in Sources */, FDF8488329405A12007DCAE5 /* BatchResponse.swift in Sources */,
FDFF9FDF2A787F57005E0628 /* JSONEncoder+Utilities.swift in Sources */, FDFF9FDF2A787F57005E0628 /* JSONEncoder+Utilities.swift in Sources */,
FD7F746E2BB2766D006DDFD8 /* PreparedRequest.swift in Sources */, FD7F746E2BB2766D006DDFD8 /* PreparedRequest.swift in Sources */,
@ -6505,7 +6506,6 @@
FD716E7128505E5200C96BF4 /* MessageRequestsCell.swift in Sources */, FD716E7128505E5200C96BF4 /* MessageRequestsCell.swift in Sources */,
FDF848F329413DB0007DCAE5 /* ImagePickerHandler.swift in Sources */, FDF848F329413DB0007DCAE5 /* ImagePickerHandler.swift in Sources */,
B88FA7F2260C3EB10049422F /* OpenGroupSuggestionGrid.swift in Sources */, B88FA7F2260C3EB10049422F /* OpenGroupSuggestionGrid.swift in Sources */,
94FC7A8E2C759805004A8146 /* Constants.swift in Sources */,
9422569F2C23F8FE00C0FDBF /* ScanQRCodeScreen.swift in Sources */, 9422569F2C23F8FE00C0FDBF /* ScanQRCodeScreen.swift in Sources */,
FD71160428C95B5600B47552 /* PhotoCollectionPickerViewModel.swift in Sources */, FD71160428C95B5600B47552 /* PhotoCollectionPickerViewModel.swift in Sources */,
FD37EA1928AC5CCA003AE748 /* NotificationSoundViewModel.swift in Sources */, FD37EA1928AC5CCA003AE748 /* NotificationSoundViewModel.swift in Sources */,

@ -255,7 +255,7 @@ extension ConversationVC:
title: "giphyWarning".localized(), title: "giphyWarning".localized(),
body: .text( body: .text(
"giphyWarningDescription" "giphyWarningDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
), ),
confirmTitle: "theContinue".localized() confirmTitle: "theContinue".localized()
@ -647,7 +647,7 @@ extension ConversationVC:
title: "linkPreviewsEnable".localized(), title: "linkPreviewsEnable".localized(),
body: .text( body: .text(
"linkPreviewsFirstDescription" "linkPreviewsFirstDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
), ),
confirmTitle: "enable".localized() confirmTitle: "enable".localized()
@ -2261,7 +2261,7 @@ extension ConversationVC:
let modal: ConfirmationModal = ConfirmationModal( let modal: ConfirmationModal = ConfirmationModal(
targetView: self.view, targetView: self.view,
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: Singleton.appName, title: Constants.app_name,
body: .text("This will ban the selected user from this room. It won't ban them from other rooms."), body: .text("This will ban the selected user from this room. It won't ban them from other rooms."),
confirmTitle: "okay".localized(), confirmTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,
@ -2320,7 +2320,7 @@ extension ConversationVC:
let modal: ConfirmationModal = ConfirmationModal( let modal: ConfirmationModal = ConfirmationModal(
targetView: self.view, targetView: self.view,
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: Singleton.appName, title: Constants.app_name,
body: .text("This will ban the selected user from this room and delete all messages sent by them. It won't ban them from other rooms or delete the messages they sent there."), body: .text("This will ban the selected user from this room and delete all messages sent by them. It won't ban them from other rooms or delete the messages they sent there."),
confirmTitle: "okay".localized(), confirmTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,

@ -87,7 +87,7 @@ struct OpenGroupInvitationView_SwiftUI: View {
struct OpenGroupInvitationView_SwiftUI_Previews: PreviewProvider { struct OpenGroupInvitationView_SwiftUI_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
OpenGroupInvitationView_SwiftUI( OpenGroupInvitationView_SwiftUI(
name: Singleton.appName, name: Constants.app_name,
url: "http://open.getsession.org/session?public_key=a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238", url: "http://open.getsession.org/session?public_key=a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238",
textColor: .messageBubble_outgoingText, textColor: .messageBubble_outgoingText,
isOutgoing: true isOutgoing: true

@ -248,7 +248,7 @@ final class HomeVC: BaseVC, LibSessionRespondingViewController, UITableViewDataS
let welcomeLabel = UILabel() let welcomeLabel = UILabel()
welcomeLabel.font = .systemFont(ofSize: Values.smallFontSize) welcomeLabel.font = .systemFont(ofSize: Values.smallFontSize)
welcomeLabel.text = "onboardingBubbleWelcomeToSession" welcomeLabel.text = "onboardingBubbleWelcomeToSession"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
welcomeLabel.themeTextColor = .sessionButton_text welcomeLabel.themeTextColor = .sessionButton_text
welcomeLabel.textAlignment = .center welcomeLabel.textAlignment = .center

@ -439,7 +439,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
/// This **must** be a standard `UIAlertController` instead of a `ConfirmationModal` because we may not /// This **must** be a standard `UIAlertController` instead of a `ConfirmationModal` because we may not
/// have access to the database when displaying this so can't extract theme information for styling purposes /// have access to the database when displaying this so can't extract theme information for styling purposes
let alert: UIAlertController = UIAlertController( let alert: UIAlertController = UIAlertController(
title: Singleton.appName, title: Constants.app_name,
message: error.message, message: error.message,
preferredStyle: .alert preferredStyle: .alert
) )
@ -496,7 +496,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
default: break default: break
} }
alert.addAction(UIAlertAction(title: "quit".put(key: "app_name", value: Singleton.appName).localized(), style: .default) { _ in alert.addAction(UIAlertAction(title: "quit".put(key: "app_name", value: Constants.app_name).localized(), style: .default) { _ in
Log.flush() Log.flush()
exit(0) exit(0)
}) })
@ -943,12 +943,12 @@ private enum StartupError: Error {
case .databaseError(StorageError.migrationNoLongerSupported): case .databaseError(StorageError.migrationNoLongerSupported):
return "databaseErrorUpdate" return "databaseErrorUpdate"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
case .startupTimeout: case .startupTimeout:
return "databaseErrorTimeout" return "databaseErrorTimeout"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
} }
} }

File diff suppressed because one or more lines are too long

@ -137,12 +137,12 @@ public class NotificationPresenter: NotificationsProtocol {
switch previewType { switch previewType {
case .noNameNoPreview: case .noNameNoPreview:
notificationTitle = Singleton.appName notificationTitle = Constants.app_name
case .nameNoPreview, .nameAndPreview: case .nameNoPreview, .nameAndPreview:
switch thread.variant { switch thread.variant {
case .contact: case .contact:
notificationTitle = (isMessageRequest ? Singleton.appName : senderName) notificationTitle = (isMessageRequest ? Constants.app_name : senderName)
case .legacyGroup, .group, .community: case .legacyGroup, .group, .community:
notificationTitle = "notificationsIosGroup" notificationTitle = "notificationsIosGroup"
@ -257,7 +257,7 @@ public class NotificationPresenter: NotificationsProtocol {
AppNotificationUserInfoKey.threadVariantRaw: thread.variant.rawValue AppNotificationUserInfoKey.threadVariantRaw: thread.variant.rawValue
] ]
let notificationTitle: String = Singleton.appName let notificationTitle: String = Constants.app_name
let senderName: String = Profile.displayName(db, id: interaction.authorId, threadVariant: thread.variant) let senderName: String = Profile.displayName(db, id: interaction.authorId, threadVariant: thread.variant)
let notificationBody: String? = { let notificationBody: String? = {
switch messageInfo.state { switch messageInfo.state {

@ -204,13 +204,13 @@ struct FakeChat: View {
let chatBubbles: [ChatBubble] = [ let chatBubbles: [ChatBubble] = [
ChatBubble( ChatBubble(
text: "onboardingBubbleWelcomeToSession" text: "onboardingBubbleWelcomeToSession"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() + " 👋", .localized() + " 👋",
outgoing: false outgoing: false
), ),
ChatBubble( ChatBubble(
text: "onboardingBubbleSessionIsEngineered" text: "onboardingBubbleSessionIsEngineered"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized(), .localized(),
outgoing: true outgoing: true
), ),

@ -40,7 +40,7 @@ struct PNModeScreen: View {
mode: .slow, mode: .slow,
title: "notificationsSlowMode".localized(), title: "notificationsSlowMode".localized(),
explanation: "notificationsSlowModeDescription" explanation: "notificationsSlowModeDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized(), .localized(),
isRecommended: false, isRecommended: false,
accessibility: Accessibility( accessibility: Accessibility(
@ -67,7 +67,7 @@ struct PNModeScreen: View {
Text( Text(
"onboardingMessageNotificationExplanation" "onboardingMessageNotificationExplanation"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
) )
.font(.system(size: Values.smallFontSize)) .font(.system(size: Values.smallFontSize))

@ -522,7 +522,7 @@ private final class ScanQRCodePlaceholderVC: UIViewController {
let explanationLabel = UILabel() let explanationLabel = UILabel()
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize) explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = "cameraGrantAccessQr" explanationLabel.text = "cameraGrantAccessQr"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
explanationLabel.themeTextColor = .textPrimary explanationLabel.themeTextColor = .textPrimary
explanationLabel.textAlignment = .center explanationLabel.textAlignment = .center

@ -75,7 +75,7 @@ final class PathVC: BaseVC {
let explanationLabel = UILabel() let explanationLabel = UILabel()
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize) explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = "onionRoutingPathDescription" explanationLabel.text = "onionRoutingPathDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
explanationLabel.themeTextColor = .textSecondary explanationLabel.themeTextColor = .textSecondary
explanationLabel.textAlignment = .center explanationLabel.textAlignment = .center

@ -54,7 +54,7 @@ class HelpViewModel: SessionTableViewModel, NavigatableStateHolder, ObservableTa
id: .report, id: .report,
title: "helpReportABug".localized(), title: "helpReportABug".localized(),
subtitle: "helpReportABugExportLogsDescription" subtitle: "helpReportABugExportLogsDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized(), .localized(),
rightAccessory: .highlightingBackgroundLabel( rightAccessory: .highlightingBackgroundLabel(
title: "helpReportABugExportLogs".localized() title: "helpReportABugExportLogs".localized()
@ -69,7 +69,7 @@ class HelpViewModel: SessionTableViewModel, NavigatableStateHolder, ObservableTa
SessionCell.Info( SessionCell.Info(
id: .translate, id: .translate,
title: "helpHelpUsTranslateSession" title: "helpHelpUsTranslateSession"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized(), .localized(),
rightAccessory: .icon( rightAccessory: .icon(
UIImage(systemName: "arrow.up.forward.app")? UIImage(systemName: "arrow.up.forward.app")?

@ -109,7 +109,7 @@ class PrivacySettingsViewModel: SessionTableViewModel, NavigationItemSource, Nav
id: .screenLock, id: .screenLock,
title: "lockApp".localized(), title: "lockApp".localized(),
subtitle: "lockAppDescriptionIos" subtitle: "lockAppDescriptionIos"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized(), .localized(),
rightAccessory: .toggle( rightAccessory: .toggle(
.boolValue( .boolValue(

@ -424,7 +424,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
title: "sessionInviteAFriend".localized(), title: "sessionInviteAFriend".localized(),
onTap: { onTap: {
let invitation: String = "accountIdShare" let invitation: String = "accountIdShare"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.put(key: "account_id", value: state.profile.id) .put(key: "account_id", value: state.profile.id)
.put(key: "download_url", value: "https://getsession.org/") .put(key: "download_url", value: "https://getsession.org/")
.localized() .localized()

@ -44,7 +44,7 @@ struct ScanQRCodeScreen: View {
Text( Text(
"cameraGrantAccessQr" "cameraGrantAccessQr"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
) )
.font(.system(size: Values.smallFontSize)) .font(.system(size: Values.smallFontSize))

@ -28,7 +28,7 @@ public enum Permissions {
title: "permissionsRequired".localized(), title: "permissionsRequired".localized(),
body: .text( body: .text(
"cameraGrantAccessDenied" "cameraGrantAccessDenied"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
), ),
confirmTitle: "sessionSettings".localized(), confirmTitle: "sessionSettings".localized(),
@ -70,7 +70,7 @@ public enum Permissions {
title: "permissionsRequired".localized(), title: "permissionsRequired".localized(),
body: .text( body: .text(
"permissionsMicrophoneAccessRequiredIos" "permissionsMicrophoneAccessRequiredIos"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
), ),
confirmTitle: "sessionSettings".localized(), confirmTitle: "sessionSettings".localized(),
@ -130,7 +130,7 @@ public enum Permissions {
title: "permissionsRequired".localized(), title: "permissionsRequired".localized(),
body: .text( body: .text(
"permissionsLibrary" "permissionsLibrary"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
), ),
confirmTitle: "sessionSettings".localized(), confirmTitle: "sessionSettings".localized(),

@ -79,7 +79,7 @@ public class NSENotificationPresenter: NSObject, NotificationsProtocol {
.localized() .localized()
case .noNameNoPreview: case .noNameNoPreview:
notificationContent.title = Singleton.appName notificationContent.title = Constants.app_name
notificationContent.body = "messageNewYouveGot" notificationContent.body = "messageNewYouveGot"
.putNumber(1) .putNumber(1)
.localized() .localized()
@ -88,7 +88,7 @@ public class NSENotificationPresenter: NSObject, NotificationsProtocol {
// If it's a message request then overwrite the body to be something generic (only show a notification // If it's a message request then overwrite the body to be something generic (only show a notification
// when receiving a new message request if there aren't any others or the user had hidden them) // when receiving a new message request if there aren't any others or the user had hidden them)
if isMessageRequest { if isMessageRequest {
notificationContent.title = Singleton.appName notificationContent.title = Constants.app_name
notificationContent.body = "messageRequestsNew".localized() notificationContent.body = "messageRequestsNew".localized()
} }
@ -167,7 +167,7 @@ public class NSENotificationPresenter: NSObject, NotificationsProtocol {
.map { NSNumber(value: $0) } .map { NSNumber(value: $0) }
.defaulting(to: NSNumber(value: 0)) .defaulting(to: NSNumber(value: 0))
notificationContent.title = Singleton.appName notificationContent.title = Constants.app_name
notificationContent.body = "" notificationContent.body = ""
let senderName: String = Profile.displayName(db, id: interaction.authorId, threadVariant: thread.variant) let senderName: String = Profile.displayName(db, id: interaction.authorId, threadVariant: thread.variant)

@ -461,7 +461,7 @@ public final class NotificationServiceExtension: UNNotificationServiceExtension
private func handleFailureForVoIP(_ db: Database, for callMessage: CallMessage) { private func handleFailureForVoIP(_ db: Database, for callMessage: CallMessage) {
let notificationContent = UNMutableNotificationContent() let notificationContent = UNMutableNotificationContent()
notificationContent.userInfo = [ NotificationServiceExtension.isFromRemoteKey : true ] notificationContent.userInfo = [ NotificationServiceExtension.isFromRemoteKey : true ]
notificationContent.title = Singleton.appName notificationContent.title = Constants.app_name
notificationContent.badge = (try? Interaction.fetchUnreadCount(db)) notificationContent.badge = (try? Interaction.fetchUnreadCount(db))
.map { NSNumber(value: $0) } .map { NSNumber(value: $0) }
.defaulting(to: NSNumber(value: 0)) .defaulting(to: NSNumber(value: 0))
@ -500,7 +500,7 @@ public final class NotificationServiceExtension: UNNotificationServiceExtension
Storage.suspendDatabaseAccess() Storage.suspendDatabaseAccess()
Log.flush() Log.flush()
content.title = Singleton.appName content.title = Constants.app_name
content.body = "messageNewYouveGot" content.body = "messageNewYouveGot"
.putNumber(1) .putNumber(1)
.localized() .localized()

@ -32,7 +32,7 @@ final class SAEScreenLockViewController: ScreenLockViewController {
let titleLabel: UILabel = UILabel() let titleLabel: UILabel = UILabel()
titleLabel.font = UIFont.boldSystemFont(ofSize: Values.veryLargeFontSize) titleLabel.font = UIFont.boldSystemFont(ofSize: Values.veryLargeFontSize)
titleLabel.text = "shareToSession" titleLabel.text = "shareToSession"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
titleLabel.themeTextColor = .textPrimary titleLabel.themeTextColor = .textPrimary

@ -254,7 +254,7 @@ final class ShareNavController: UINavigationController, ShareViewDelegate {
let modal: ConfirmationModal = ConfirmationModal( let modal: ConfirmationModal = ConfirmationModal(
targetView: self.view, targetView: self.view,
info: ConfirmationModal.Info( info: ConfirmationModal.Info(
title: Singleton.appName, title: Constants.app_name,
body: .text(error.localizedDescription), body: .text(error.localizedDescription),
cancelTitle: "okay".localized(), cancelTitle: "okay".localized(),
cancelStyle: .alert_text, cancelStyle: .alert_text,

@ -31,7 +31,7 @@ final class ThreadPickerVC: UIViewController, UITableViewDataSource, UITableView
let titleLabel: UILabel = UILabel() let titleLabel: UILabel = UILabel()
titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize) titleLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize)
titleLabel.text = "shareToSession" titleLabel.text = "shareToSession"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
titleLabel.themeTextColor = .textPrimary titleLabel.themeTextColor = .textPrimary

@ -12,8 +12,6 @@ public extension Singleton {
static var hasAppContext: Bool { _appContext.wrappedValue != nil } static var hasAppContext: Bool { _appContext.wrappedValue != nil }
static func setup(appContext: AppContext) { _appContext.mutate { $0 = appContext } } static func setup(appContext: AppContext) { _appContext.mutate { $0 = appContext } }
static var appName: String { "Session" } // stringlint:disable
} }
// MARK: - AppContext // MARK: - AppContext

@ -291,7 +291,7 @@ public class MediaMessageView: UIView {
// If we have no link preview info at this point then assume link previews are disabled // If we have no link preview info at this point then assume link previews are disabled
else { else {
label.text = "linkPreviewsTurnedOffDescription" label.text = "linkPreviewsTurnedOffDescription"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
label.themeTextColor = .textPrimary label.themeTextColor = .textPrimary
label.textAlignment = .center label.textAlignment = .center

@ -53,7 +53,7 @@ public class ScreenLock {
// Description of how and why Signal iOS uses Touch ID/Face ID/Phone Passcode to // Description of how and why Signal iOS uses Touch ID/Face ID/Phone Passcode to
// unlock 'screen lock'. // unlock 'screen lock'.
localizedReason: "authenticateToOpen" localizedReason: "authenticateToOpen"
.put(key: "app_name", value: Singleton.appName) .put(key: "app_name", value: Constants.app_name)
.localized() .localized()
) { outcome in ) { outcome in
AssertIsOnMainThread() AssertIsOnMainThread()

Loading…
Cancel
Save