diff --git a/yobble/Resources/Localizable.xcstrings b/yobble/Resources/Localizable.xcstrings index 3b07bcf..f652495 100644 --- a/yobble/Resources/Localizable.xcstrings +++ b/yobble/Resources/Localizable.xcstrings @@ -122,6 +122,7 @@ }, "ForceUpdate.Message" : { "comment" : "Force update alert message", + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { @@ -139,6 +140,7 @@ }, "ForceUpdate.Title" : { "comment" : "Force update alert title", + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { @@ -183,12 +185,6 @@ }, "Login must not end with 'bot' for non-bot accounts" : { - }, - "NeedUpdate.Message" : { - "comment" : "Need update alert message" - }, - "NeedUpdate.Title" : { - "comment" : "Need update alert title" }, "OK" : { "comment" : "Common OK\nProfile update alert button\nОбщий текст кнопки OK", @@ -247,6 +243,7 @@ }, "SoftUpdate.Message" : { "comment" : "Soft update alert message", + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { @@ -264,6 +261,7 @@ }, "SoftUpdate.Title" : { "comment" : "Soft update alert title", + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { @@ -584,6 +582,9 @@ }, "Выключено" : { + }, + "Вышла новая версия приложения с улучшениями и исправлениями." : { + "comment" : "Soft update alert message" }, "Где найти сохранённые черновики?" : { "comment" : "FAQ question: drafts" @@ -646,6 +647,9 @@ }, "Для начала, мы рекомендуем настроить параметры безопасности вашего аккаунта." : { + }, + "Для продолжения работы необходимо обновить приложение до последней версии." : { + "comment" : "Need update alert message" }, "Добавить в контакты" : { "comment" : "Message profile add to contacts title" @@ -679,6 +683,9 @@ "Дополнительные действия." : { "comment" : "Message profile more action description" }, + "Доступно обновление" : { + "comment" : "Soft update alert title" + }, "Другие устройства (%d)" : { "comment" : "Заголовок секции других устройств с количеством" }, @@ -1843,6 +1850,9 @@ }, "Обновить приложение" : { + }, + "Обновление обязательно" : { + "comment" : "Need update alert title" }, "Обратная связь" : { "comment" : "feedback: navigation title", @@ -2749,6 +2759,9 @@ "Рейтинг собеседника" : { "comment" : "Message profile rating title" }, + "Рекомендуется обновление" : { + "comment" : "Force update alert title" + }, "Рожки и ножки у сообщений" : { }, @@ -3308,6 +3321,9 @@ }, "Экспериментальная поддержка iOS 15/16" : { + }, + "Эта версия приложения устарела. Некоторые функции могут работать некорректно." : { + "comment" : "Force update alert message" }, "Это устройство" : { "comment" : "Заголовок секции текущего устройства" diff --git a/yobble/ViewModels/LoginViewModel.swift b/yobble/ViewModels/LoginViewModel.swift index 43466ab..7316f27 100644 --- a/yobble/ViewModels/LoginViewModel.swift +++ b/yobble/ViewModels/LoginViewModel.swift @@ -7,8 +7,11 @@ import Foundation import Combine +import SwiftUI class LoginViewModel: ObservableObject { + @AppStorage("appIsBlocked") private var isAppBlocked: Bool = false + @Published var username: String = "" @Published var userId: String = "" @Published var password: String = "" @@ -134,7 +137,8 @@ class LoginViewModel: ObservableObject { self?.socketService.disconnect() } self?.isLoading = false - self?.isInitialLoading = false + if self?.isAppBlocked == false{ + self?.isInitialLoading = false} } } } diff --git a/yobble/yobbleApp.swift b/yobble/yobbleApp.swift index 8c2ebe4..00c7d49 100644 --- a/yobble/yobbleApp.swift +++ b/yobble/yobbleApp.swift @@ -97,12 +97,6 @@ struct yobbleApp: App { message: notice.message, onUpdate: { updateChecker.openAppStore() } ) - } else if let notice = updateChecker.forceUpdateNotice { - ForceUpdateView( - title: notice.title, - message: notice.message, - onUpdate: { updateChecker.openAppStore() } - ) } } }