mirror of
https://github.com/RSSNext/Folo.git
synced 2026-10-27 02:44:15 +08:00
After a language switch the native iOS tab bar kept its old labels, since
only the first title reached the tab bar item, and times on screen mixed
languages ("2 years前"). Later titles now reach the item, the dayjs locale
switches before the language, and relative times re-format on the switch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
603 B
Swift
29 lines
603 B
Swift
//
|
|
// TabScreenView.swift
|
|
// FollowNative
|
|
//
|
|
// Created by Innei on 2025/3/16.
|
|
//
|
|
|
|
import ExpoModulesCore
|
|
import UIKit
|
|
|
|
class TabScreenView: ExpoView {
|
|
weak var ownerViewController: UIViewController?
|
|
|
|
var icon: String?
|
|
var activeIcon: String?
|
|
var title: String? {
|
|
didSet {
|
|
// The tab bar item copies the title once, when the tab is inserted, so a later title, e.g.
|
|
// after a language switch, has to be passed on here
|
|
ownerViewController?.tabBarItem.title = title
|
|
}
|
|
}
|
|
|
|
required init(appContext: AppContext? = nil) {
|
|
super.init(appContext: appContext)
|
|
}
|
|
|
|
}
|