Rename tab to “Notifications”
This commit is contained in:
parent
c2232a596d
commit
ed9911ca76
|
@ -96,7 +96,7 @@
|
|||
"tabs": {
|
||||
"home": "Home",
|
||||
"search": "Search",
|
||||
"notification": "Notification",
|
||||
"notifications": "Notifications",
|
||||
"profile": "Profile"
|
||||
},
|
||||
"keyboard": {
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
"tabs": {
|
||||
"home": "Home",
|
||||
"search": "Search",
|
||||
"notification": "Notification",
|
||||
"notifications": "Notifications",
|
||||
"profile": "Profile"
|
||||
},
|
||||
"keyboard": {
|
||||
|
|
|
@ -71,8 +71,8 @@ final public class SceneCoordinator {
|
|||
self.setup()
|
||||
try await Task.sleep(nanoseconds: .second * 1)
|
||||
|
||||
// redirect to notification tab
|
||||
self.switchToTabBar(tab: .notification)
|
||||
// redirect to notifications tab
|
||||
self.switchToTabBar(tab: .notifications)
|
||||
|
||||
// Delay in next run loop
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
|
|
|
@ -49,7 +49,7 @@ class MainTabBarController: UITabBarController {
|
|||
case home
|
||||
case search
|
||||
case compose
|
||||
case notification
|
||||
case notifications
|
||||
case me
|
||||
|
||||
var tag: Int {
|
||||
|
@ -61,7 +61,7 @@ class MainTabBarController: UITabBarController {
|
|||
case .home: return L10n.Common.Controls.Tabs.home
|
||||
case .search: return L10n.Common.Controls.Tabs.search
|
||||
case .compose: return L10n.Common.Controls.Actions.compose
|
||||
case .notification: return L10n.Common.Controls.Tabs.notification
|
||||
case .notifications: return L10n.Common.Controls.Tabs.notifications
|
||||
case .me: return L10n.Common.Controls.Tabs.profile
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class MainTabBarController: UITabBarController {
|
|||
case .home: return Asset.ObjectsAndTools.house.image.withRenderingMode(.alwaysTemplate)
|
||||
case .search: return Asset.ObjectsAndTools.magnifyingglass.image.withRenderingMode(.alwaysTemplate)
|
||||
case .compose: return Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notification: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notifications: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
case .me: return UIImage(systemName: "person")!
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class MainTabBarController: UITabBarController {
|
|||
case .home: return Asset.ObjectsAndTools.houseFill.image.withRenderingMode(.alwaysTemplate)
|
||||
case .search: return Asset.ObjectsAndTools.magnifyingglassFill.image.withRenderingMode(.alwaysTemplate)
|
||||
case .compose: return Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notification: return Asset.ObjectsAndTools.bellFill.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notifications: return Asset.ObjectsAndTools.bellFill.image.withRenderingMode(.alwaysTemplate)
|
||||
case .me: return UIImage(systemName: "person.fill")!
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class MainTabBarController: UITabBarController {
|
|||
case .home: return Asset.ObjectsAndTools.house.image.withRenderingMode(.alwaysTemplate).resized(size: CGSize(width: 80, height: 80))
|
||||
case .search: return Asset.ObjectsAndTools.magnifyingglass.image.withRenderingMode(.alwaysTemplate).resized(size: CGSize(width: 80, height: 80))
|
||||
case .compose: return Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate).resized(size: CGSize(width: 80, height: 80))
|
||||
case .notification: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate).resized(size: CGSize(width: 80, height: 80))
|
||||
case .notifications: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate).resized(size: CGSize(width: 80, height: 80))
|
||||
case .me: return UIImage(systemName: "person", withConfiguration: UIImage.SymbolConfiguration(pointSize: 80))!
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class MainTabBarController: UITabBarController {
|
|||
case .home: return Asset.ObjectsAndTools.house.image.withRenderingMode(.alwaysTemplate)
|
||||
case .search: return Asset.ObjectsAndTools.magnifyingglass.image.withRenderingMode(.alwaysTemplate)
|
||||
case .compose: return Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notification: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
case .notifications: return Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
case .me: return UIImage(systemName: "person")!
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ class MainTabBarController: UITabBarController {
|
|||
viewController = _viewController
|
||||
case .compose:
|
||||
viewController = UIViewController()
|
||||
case .notification:
|
||||
case .notifications:
|
||||
let _viewController = NotificationViewController()
|
||||
_viewController.context = context
|
||||
_viewController.coordinator = coordinator
|
||||
|
@ -272,7 +272,7 @@ extension MainTabBarController {
|
|||
} ?? false
|
||||
|
||||
let image: UIImage = {
|
||||
if currentTab == .notification {
|
||||
if currentTab == .notifications {
|
||||
return hasUnreadPushNotification ? Asset.ObjectsAndTools.bellBadgeFill.image.withRenderingMode(.alwaysTemplate) : Asset.ObjectsAndTools.bellFill.image.withRenderingMode(.alwaysTemplate)
|
||||
} else {
|
||||
return hasUnreadPushNotification ? Asset.ObjectsAndTools.bellBadge.image.withRenderingMode(.alwaysTemplate) : Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
|
@ -593,7 +593,7 @@ extension MainTabBarController {
|
|||
let tabs: [Tab] = [
|
||||
.home,
|
||||
.search,
|
||||
.notification,
|
||||
.notifications,
|
||||
.me
|
||||
]
|
||||
for (i, tab) in tabs.enumerated() {
|
||||
|
|
|
@ -100,7 +100,7 @@ extension SidebarViewModel {
|
|||
.store(in: &cell.disposeBag)
|
||||
|
||||
switch item {
|
||||
case .notification:
|
||||
case .notifications:
|
||||
Publishers.CombineLatest(
|
||||
self.context.notificationService.unreadNotificationCountDidUpdate,
|
||||
self.$currentTab
|
||||
|
@ -116,7 +116,7 @@ extension SidebarViewModel {
|
|||
}()
|
||||
|
||||
let image: UIImage = {
|
||||
if currentTab == .notification {
|
||||
if currentTab == .notifications {
|
||||
return hasUnreadPushNotification ? Asset.ObjectsAndTools.bellBadgeFill.image.withRenderingMode(.alwaysTemplate) : Asset.ObjectsAndTools.bellFill.image.withRenderingMode(.alwaysTemplate)
|
||||
} else {
|
||||
return hasUnreadPushNotification ? Asset.ObjectsAndTools.bellBadge.image.withRenderingMode(.alwaysTemplate) : Asset.ObjectsAndTools.bell.image.withRenderingMode(.alwaysTemplate)
|
||||
|
@ -192,7 +192,7 @@ extension SidebarViewModel {
|
|||
let items: [Item] = [
|
||||
.tab(.home),
|
||||
.tab(.search),
|
||||
.tab(.notification),
|
||||
.tab(.notifications),
|
||||
.tab(.me),
|
||||
.setting,
|
||||
]
|
||||
|
|
|
@ -172,7 +172,7 @@ extension SceneDelegate {
|
|||
return false
|
||||
}
|
||||
|
||||
coordinator.switchToTabBar(tab: .notification)
|
||||
coordinator.switchToTabBar(tab: .notifications)
|
||||
|
||||
case "org.joinmastodon.app.new-post":
|
||||
if coordinator?.tabBarController.topMost is ComposeViewController {
|
||||
|
|
|
@ -366,8 +366,8 @@ public enum L10n {
|
|||
public enum Tabs {
|
||||
/// Home
|
||||
public static let home = L10n.tr("Localizable", "Common.Controls.Tabs.Home")
|
||||
/// Notification
|
||||
public static let notification = L10n.tr("Localizable", "Common.Controls.Tabs.Notification")
|
||||
/// Notifications
|
||||
public static let notifications = L10n.tr("Localizable", "Common.Controls.Tabs.Notifications")
|
||||
/// Profile
|
||||
public static let profile = L10n.tr("Localizable", "Common.Controls.Tabs.Profile")
|
||||
/// Search
|
||||
|
|
|
@ -131,7 +131,7 @@ Please check your internet connection.";
|
|||
"Common.Controls.Status.Visibility.PrivateFromMe" = "Only my followers can see this post.";
|
||||
"Common.Controls.Status.Visibility.Unlisted" = "Everyone can see this post but not display in the public timeline.";
|
||||
"Common.Controls.Tabs.Home" = "Home";
|
||||
"Common.Controls.Tabs.Notification" = "Notification";
|
||||
"Common.Controls.Tabs.Notifications" = "Notifications";
|
||||
"Common.Controls.Tabs.Profile" = "Profile";
|
||||
"Common.Controls.Tabs.Search" = "Search";
|
||||
"Common.Controls.Timeline.Filtered" = "Filtered";
|
||||
|
|
Loading…
Reference in New Issue