diff --git a/.github/workflows/statuscheck-runner.yml b/.github/workflows/statuscheck-runner.yml index 9a06b1fbe..7197fd559 100644 --- a/.github/workflows/statuscheck-runner.yml +++ b/.github/workflows/statuscheck-runner.yml @@ -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 @@ -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 }} @@ -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 diff --git a/DarockBili Watch App/Extension/CodeExt.swift b/DarockBili Watch App/Extension/CodeExt.swift index bf47115f8..c9be619e3 100644 --- a/DarockBili Watch App/Extension/CodeExt.swift +++ b/DarockBili Watch App/Extension/CodeExt.swift @@ -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) diff --git a/DarockBili Watch App/PersonalCenter/FollowListView.swift b/DarockBili Watch App/PersonalCenter/FollowListView.swift index 1bd98490d..66236e0f5 100644 --- a/DarockBili Watch App/PersonalCenter/FollowListView.swift +++ b/DarockBili Watch App/PersonalCenter/FollowListView.swift @@ -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 diff --git a/DarockBili Watch App/Video/VideoCommentsView.swift b/DarockBili Watch App/Video/VideoCommentsView.swift index 321aab315..8d39c5d55 100644 --- a/DarockBili Watch App/Video/VideoCommentsView.swift +++ b/DarockBili Watch App/Video/VideoCommentsView.swift @@ -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 @@ -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 { diff --git a/DarockBili Watch App/Video/VideoDetailView.swift b/DarockBili Watch App/Video/VideoDetailView.swift index 3d3b0651a..2b7a91a21 100644 --- a/DarockBili Watch App/Video/VideoDetailView.swift +++ b/DarockBili Watch App/Video/VideoDetailView.swift @@ -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 {