Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ authored Dec 9, 2023
2 parents 38d94c8 + 9f86c69 commit 3ab1e0c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/statuscheck-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
name: Check Comment Content
outputs:
shouldc: ${{ steps.checkc.outputs.shouldc }}
shouldtun: ${{ steps.checkc.outputs.shouldtun }}
shouldtui: ${{ steps.checkc.outputs.shouldtui }}
shouldta: ${{ steps.checkc.outputs.shouldta }}
steps:
- name: Check
id: checkc
Expand All @@ -22,10 +25,24 @@ jobs:
echo "The comment content contains the specified text. Continuing with further actions."
echo "::set-output name=shouldc::true"
fi
if [[ "${{ github.event.comment.body }}" != *"!Run unit test"* ]]; then
echo "::set-output name=shouldtun::false"
else
echo "::set-output name=shouldtun::true"
fi
if [[ "${{ github.event.comment.body }}" != *"!Run UI test"* ]]; then
echo "::set-output name=shouldtui::false"
else
echo "::set-output name=shouldtui::true"
fi
if [[ "${{ github.event.comment.body }}" != *"!Run test"* ]]; then
echo "::set-output name=shouldta::false"
else
echo "::set-output name=shouldta::true"
fi
get-head-sha:
name: Get Pull Request Head SHA
needs: checkif
if: ${{ needs.checkif.outputs.shouldc == 'true' }}
runs-on: ubuntu-latest
outputs:
psha: ${{ steps.getsha.outputs.psha }}
Expand All @@ -40,7 +57,10 @@ jobs:
echo "psha=$sha" >> $GITHUB_OUTPUT
call-check-workflow:
name: Call Check Overflow
needs: get-head-sha
needs:
- get-head-sha
- checkif
if: ${{ needs.checkif.outputs.shouldc == 'true' }}
permissions:
actions: write
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion DarockBili Watch App/Extension/CodeExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func biliWbiSign(paramEncoded: String, completion: @escaping (String?) -> Void)
func getMixinKey(orig: String) -> String {
return String(mixinKeyEncTab.map { orig[orig.index(orig.startIndex, offsetBy: $0)] }.prefix(32))
}

func encWbi(params: [String: Any], imgKey: String, subKey: String) -> [String: Any] {
var params = params
let mixinKey = getMixinKey(orig: imgKey + subKey)
Expand Down
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 3ab1e0c

Please sign in to comment.