зеркало из https://github.com/nextcloud/talk-ios.git
Merge pull request #1133 from nextcloud/add-subtitle-to-account-switcher
Show subtitle on account switcher on iOS >= 15
This commit is contained in:
Коммит
4b10c36a04
|
@ -452,6 +452,12 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success);
|
|||
[[NCSettingsController sharedInstance] setActiveAccountWithAccountId:account.accountId];
|
||||
}];
|
||||
|
||||
if (@available(iOS 15.0, *)) {
|
||||
if (account.unreadBadgeNumber > 0) {
|
||||
switchAccountAction.subtitle = [NSString localizedStringWithFormat:NSLocalizedString(@"%ld notifications", nil), (long)account.unreadBadgeNumber];
|
||||
}
|
||||
}
|
||||
|
||||
if (account.active) {
|
||||
switchAccountAction.state = UIMenuElementStateOn;
|
||||
}
|
||||
|
|
|
@ -86,5 +86,22 @@
|
|||
<string>%d days ago</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<key>%ld notifications</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@notifications@</string>
|
||||
<key>notifications</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>%ld notification</string>
|
||||
<key>other</key>
|
||||
<string>%ld notifications</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Загрузка…
Ссылка в новой задаче