Skip to content

Commit

Permalink
Merge pull request #373 from Darock-Studio/opt/feats
Browse files Browse the repository at this point in the history
Fixed issues
  • Loading branch information
Mark Chan authored Jul 11, 2024
2 parents ee401d2 + 250032b commit 3d3ac08
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 78 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ disabled_rules:
- syntactic_sugar
- for_where
- legacy_constant
- non_optional_string_data_conversion

opt_in_rules:
- attributes
Expand Down
24 changes: 12 additions & 12 deletions DarockBili.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -1245,7 +1245,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -1342,7 +1342,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBiliAlternative.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B38QUJMY47;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1387,7 +1387,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B38QUJMY47;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1423,7 +1423,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand All @@ -1447,7 +1447,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B38QUJMY47;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SafariExtension/Info.plist;
Expand Down Expand Up @@ -1515,7 +1515,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1562,7 +1562,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1607,7 +1607,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1643,7 +1643,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1679,7 +1679,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand All @@ -1702,7 +1702,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1262;
CURRENT_PROJECT_VERSION = 1279;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/adamzarn/AZVideoPlayer",
"state" : {
"revision" : "f37c779bf5c00e85dc31ad25d883b3f2e5242b2a",
"version" : "1.2.0"
"revision" : "75e9e05b87d2bd60d83be4b8db280eb2859a86bc",
"version" : "1.3.0"
}
},
{
"identity" : "cepheus",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Serene-Garden/Cepheus",
"state" : {
"revision" : "38adeadadc1b52a61db4078a80aac98af3311890",
"version" : "2.0.2"
"revision" : "0754853c69a39f6cdc04abb8b1d194a3ed3a483e",
"version" : "2.3.0"
}
},
{
Expand All @@ -52,7 +52,7 @@
"location" : "https://github.com/Darock-Studio/DarockKit",
"state" : {
"branch" : "main",
"revision" : "0735d98596b3fe5280a3d287264150d4ae202076"
"revision" : "4afcdeba8f3c6ca4dbd7ba2886924bdcbadec262"
}
},
{
Expand Down Expand Up @@ -97,25 +97,25 @@
"location" : "https://github.com/mixpanel/mixpanel-swift",
"state" : {
"branch" : "master",
"revision" : "1ae92448ec3b0841ae5ceaa151c98ae66776596a"
"revision" : "e7869c433ee01cdc52aa14abf636fe0b412d72f8"
}
},
{
"identity" : "screenshotableview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RickeyBoy/ScreenshotableView",
"state" : {
"revision" : "3c140215fb12c7e8aef78e853006110350455c5b",
"version" : "1.0.0"
"revision" : "4dcc274e518756c9bb6eabc153b2edb51a7bd482",
"version" : "1.1.0"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage.git",
"state" : {
"revision" : "f6afa0132961d593f07970d84e2d8b588c29ea04",
"version" : "5.19.1"
"revision" : "be0bcd7823ce56629948491f2eaeaa19979514f7",
"version" : "5.19.4"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
notificationPayloadFile = "PushNotificationPayload.apns">
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand Down
7 changes: 0 additions & 7 deletions Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -8863,7 +8863,6 @@

},
"手记建议" : {
"extractionState" : "stale",
"localizations" : {
"zh-Hant" : {
"stringUnit" : {
Expand Down Expand Up @@ -8915,9 +8914,6 @@
},
"播放倍速" : {

},
"播放卡住/无画面?" : {

},
"文件保险箱" : {

Expand Down Expand Up @@ -9498,9 +9494,6 @@
},
"通知" : {

},
"重启 Apple Watch" : {

},
"重新载入" : {
"localizations" : {
Expand Down
3 changes: 2 additions & 1 deletion MeowBili/InMain/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct SearchMainView: View {
@AppStorage("DedeUserID__ckMd5") var dedeUserID__ckMd5 = ""
@AppStorage("SESSDATA") var sessdata = ""
@AppStorage("bili_jct") var biliJct = ""
@AppStorage("IsShowHotsInSearch") var isShowHotsInSearch = true
@State var searchText = ""
@State var isSearchPresented = false
@State var searchHistory = [String]()
Expand Down Expand Up @@ -76,7 +77,7 @@ struct SearchMainView: View {
#endif
}
}
if !hotSearches.isEmpty {
if !hotSearches.isEmpty && isShowHotsInSearch {
Section {
if !isHotSearchFolded {
ForEach(0..<hotSearches.count, id: \.self) { i in
Expand Down
2 changes: 2 additions & 0 deletions MeowBili/Others/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,12 @@ struct SuggestionViewSettingsView: View {

struct NetworkSettingsView: View {
@AppStorage("IsShowVideoSuggestionsFromDarock") var isShowVideoSuggestionsFromDarock = true
@AppStorage("IsShowHotsInSearch") var isShowHotsInSearch = true
@AppStorage("IsShowNetworkFixing") var isShowNetworkFixing = true
var body: some View {
List {
Section {
Toggle("在搜索页显示热搜", isOn: $isShowHotsInSearch)
Toggle("显示来自 Darock 的推荐", isOn: $isShowVideoSuggestionsFromDarock)
}
Section {
Expand Down
4 changes: 2 additions & 2 deletions MeowBili/PersonalCenter/UserDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@ struct UserDetailView: View {
RefreshVideos()
}
}
.onChange(of: viewSelector) { value in
switch value {
.onChange(of: viewSelector) { _ in
switch viewSelector {
case .video:
break
case .article:
Expand Down
6 changes: 3 additions & 3 deletions MeowBili/Video/VideoDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ struct VideoDetailView: View {
}
.sheet(isPresented: $isVideoPlayerPresented, content: {
VideoPlayerView(videoDetails: $videoDetails, videoLink: $videoLink, videoBvid: $videoBvid, videoCID: $videoCID)
.navigationBarHidden(true)
.toolbar(.hidden)
})
.containerBackground(for: .navigation) {
if !isInLowBatteryMode {
Expand Down Expand Up @@ -1103,7 +1103,7 @@ struct VideoDetailView: View {
})
.sheet(isPresented: $isVideoPlayerPresented, content: {
VideoPlayerView(videoDetails: $videoDetails, videoLink: $videoLink, videoBvid: $videoBvid, videoCID: $videoCID)
.navigationBarHidden(true)
.toolbar(.hidden)
})
Button(action: {
isMoreMenuPresented = true
Expand Down Expand Up @@ -1511,7 +1511,7 @@ struct VideoDetailView: View {
.sheet(isPresented: $isDownloadPresented, content: { VideoDownloadView(bvid: videoDetails["BV"]!, videoDetails: videoDetails, isPaged: true) })
.sheet(isPresented: $isVideoPlayerPresented, content: {
VideoPlayerView(videoDetails: $videoDetails, videoLink: $videoLink, videoBvid: $videoBvid, videoCID: $videoCID)
.navigationBarHidden(true)
.toolbar(.hidden)
})
}
}
Expand Down
Loading

0 comments on commit 3d3ac08

Please sign in to comment.