Skip to content

Commit

Permalink
Fix long uid crash and no data issue (#12)
Browse files Browse the repository at this point in the history
* Update VideoDetailView.swift

* Update FollowListView.swift

* Update VideoCommentsView.swift

Removed an outdated `#if swift(>=5.9)` code

* Merge main branch to fix/long-uid (#20)

* Update status-check.yml

* Delete .github/workflows/codeql.yml

* Update status-check.yml

* Create statuscheck-runner.yml

* Update ios.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Add license comments for code files (#13)

* Update ErrorGetView.swift

* Update FeedbackView.swift

* Update MemoryWarningView.swift

* Update SignalErrorView.swift

* Update AppFileManager.swift

* Update CodeExt.swift

* Update UIExt.swift

* Update ContentView.swift

* Update MainView.swift

* Update SearchView.swift

* Update LivePlayerView.swift

* Update OfflineMainView.swift

* Update AboutView.swift

* Update FirstUsingView.swift

* Update LoginView.swift

* Update NoticeView.swift

* Update SettingsView.swift

* Update bMessageSendView.swift

* Update ArticleView.swift

* Update DownloadsView.swift

* Update FavoriteView.swift

* Update FollowListView.swift

* Update HistoryView.swift

* Update PersonAccountView.swift

* Update UserDetailView.swift

* Update WatchLaterView.swift

* Update ImageViewerView.swift

* Update UserDynamicMainView.swift

* Update AudioPlayerView.swift

* Update LyricerView.swift

* Update VideoCommentsView.swift

* Update VideoDetailView.swift

* Update VideoDownloadView.swift

* Update VideoPlayerView.swift

* Update DarockBiliApp.swift

* Update status-check.yml

* Update statuscheck-runner.yml

* Update status-check.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Update status-check.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Update status-check.yml

* Update statuscheck-runner.yml

* Update statuscheck-runner.yml

* Merge next branch to main (#19)

* Fix Crash Issue when Seeing User's Videos in UserDetailsView (#15)

* Update UserDetailView.swift

* Merge main workflows (#16)

* Update status-check.yml

* Update statuscheck-runner.yml

* Update CodeExt.swift

* Update UserDetailView.swift

Fixed optional unwrap issue

* Update status-check.yml

* Update status-check.yml

* Update status-check.yml

* Update status-check.yml

* Update status-check.yml

* Update status-check.yml

* Update UserDetailView.swift

* Add local wbi sign feature (#18)

* Update CodeExt.swift

Added wbi calculation logic

* Update MainView.swift

* Update PersonAccountView.swift

* Update UserDetailView.swift

Might fix the article access issue at the same time.

* Update CodeExt.swift

* Update CodeExt.swift

* Update CodeExt.swift

* Update status-check.yml

* Update status-check.yml

* Update CodeExt.swift
  • Loading branch information
WindowsMEMZ committed Oct 12, 2024
1 parent 5f25fdc commit ed660ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DarockBili Watch App/PersonalCenter/FollowListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ struct FollowListView: View {
let datas = respJson["data"]["list"]
for data in datas {
if pinnedUsers.contains(String(data.1["mid"].int ?? 0)) {
users.insert(["Name": data.1["uname"].string ?? "[加载失败]", "Face": data.1["face"].string ?? "E", "Sign": data.1["sign"].string ?? "[加载失败]", "UID": String(data.1["mid"].int ?? 0)], at: 0)
users.insert(["Name": data.1["uname"].string ?? "[加载失败]", "Face": data.1["face"].string ?? "E", "Sign": data.1["sign"].string ?? "[加载失败]", "UID": String(data.1["mid"].int64 ?? 0)], at: 0)
} else {
users.append(["Name": data.1["uname"].string ?? "[加载失败]", "Face": data.1["face"].string ?? "E", "Sign": data.1["sign"].string ?? "[加载失败]", "UID": String(data.1["mid"].int ?? 0)])
users.append(["Name": data.1["uname"].string ?? "[加载失败]", "Face": data.1["face"].string ?? "E", "Sign": data.1["sign"].string ?? "[加载失败]", "UID": String(data.1["mid"].int64 ?? 0)])
}
}
totalPage = respJson["data"]["total"].int ?? 0 / 20 + 1
Expand Down
12 changes: 0 additions & 12 deletions DarockBili Watch App/Video/VideoCommentsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ struct VideoCommentsView: View {
var body: some View {
ScrollView {
LazyVStack {
#if swift(>=5.9)
if #unavailable(watchOS 10) {
Button(action: {
isSendCommentPresented = true
Expand All @@ -82,17 +81,6 @@ struct VideoCommentsView: View {
})
.sheet(isPresented: $isSendCommentPresented, content: {CommentSendView(oid: oid)})
}
#else
Button(action: {
isSendCommentPresented = true
}, label: {
HStack {
Image(systemName: "square.and.pencil")
Text("发送评论")
}
})
.sheet(isPresented: $isSendCommentPresented, content: {CommentSendView(oid: oid)})
#endif
if comments.count != 0 {
ForEach(0...comments.count - 1, id: \.self) { i in
VStack {
Expand Down
2 changes: 1 addition & 1 deletion DarockBili Watch App/Video/VideoDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ struct VideoDetailView: View {
if isSuccess {
debugPrint("----------Prints from VideoDetailView.onAppear.*.requsetJSON(*/view)----------")
debugPrint(respJson)
owner = ["Name": respJson["data"]["owner"]["name"].string ?? "[加载失败]", "Face": respJson["data"]["owner"]["face"].string ?? "E", "ID": String(respJson["data"]["owner"]["mid"].int ?? -1)]
owner = ["Name": respJson["data"]["owner"]["name"].string ?? "[加载失败]", "Face": respJson["data"]["owner"]["face"].string ?? "E", "ID": String(respJson["data"]["owner"]["mid"].int64 ?? -1)]
stat = ["Like": String(respJson["data"]["stat"]["like"].int ?? -1), "Coin": String(respJson["data"]["stat"]["coin"].int ?? -1), "Favorite": String(respJson["data"]["stat"]["favorite"].int ?? -1)]
videoDesc = respJson["data"]["desc"].string ?? "[加载失败]".replacingOccurrences(of: "\\n", with: "\n")
for _ in 1...4 {
Expand Down

0 comments on commit ed660ea

Please sign in to comment.