[1.186.*] Pre-release merge (#638)
This commit is contained in:
@@ -29,7 +29,7 @@ jobs:
|
||||
cache-read-only: true
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@f0f3afee809481da311ca3a6ff1ff51d81dbeb24 # v3.26.4
|
||||
uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
|
||||
with:
|
||||
languages: java
|
||||
tools: latest
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
./gradlew assembleDebug assembleInternal
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@f0f3afee809481da311ca3a6ff1ff51d81dbeb24 # v3.26.4
|
||||
uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
|
||||
with:
|
||||
category: "/language:java"
|
||||
mobsfscan:
|
||||
@@ -62,6 +62,6 @@ jobs:
|
||||
args: . --sarif --output results.sarif || true
|
||||
|
||||
- name: Upload mobsfscan report
|
||||
uses: github/codeql-action/upload-sarif@f0f3afee809481da311ca3a6ff1ff51d81dbeb24 # v3.26.4
|
||||
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright © 2022-2024 Harsh Shandilya.
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
*/
|
||||
package dev.msfjarvis.claw.android.plugins
|
||||
|
||||
import android.app.Application
|
||||
import com.deliveryhero.whetstone.app.ApplicationScope
|
||||
import com.squareup.anvil.annotations.ContributesMultibinding
|
||||
import dev.msfjarvis.claw.core.injection.AppPlugin
|
||||
import io.sentry.android.core.SentryAndroid
|
||||
import javax.inject.Inject
|
||||
|
||||
@ContributesMultibinding(ApplicationScope::class)
|
||||
class SentryAndroidPlugin @Inject constructor() : AppPlugin {
|
||||
override fun apply(application: Application) {
|
||||
SentryAndroid.init(application) { options ->
|
||||
options.experimental.sessionReplay.errorSampleRate = 1.0
|
||||
options.experimental.sessionReplay.sessionSampleRate = 0.1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,8 +40,12 @@ internal fun createListNode(
|
||||
comments: List<Comment>,
|
||||
commentState: PostComments,
|
||||
): MutableList<CommentNode> {
|
||||
// Only check unread state if there any comments read in the first place. This somewhat restores
|
||||
// the first view behavior from when `commentState` was nullable.
|
||||
val hasUnread = commentState.commentIds.isNotEmpty()
|
||||
val isUnread =
|
||||
if (hasUnread) ({ id: String -> !commentState.commentIds.contains(id) }) else { _ -> false }
|
||||
val commentNodes = mutableListOf<CommentNode>()
|
||||
val isUnread = { id: String -> !commentState.commentIds.contains(id) }
|
||||
|
||||
for (i in comments.indices) {
|
||||
if (comments[i].parentComment == null) {
|
||||
|
||||
Reference in New Issue
Block a user