Skip to content

Commit

Permalink
fix status color for grpc requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kernel0x committed Feb 22, 2024
1 parent cef4579 commit 6dd9fcc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ Pick a UI implementation and add the dependency:

````java
dependencies {
debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.7'
releaseImplementation 'com.github.kernel0x.finch:noop:2.2.7'
debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.8'
releaseImplementation 'com.github.kernel0x.finch:noop:2.2.8'
// optional only for OkHttp
debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.7'
releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.7'
debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.8'
releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.8'
// optional only for GRPC
debugImplementation 'com.github.kernel0x.finch:log-grpc:2.2.7'
releaseImplementation 'com.github.kernel0x.finch:log-grpc-noop:2.2.7'
debugImplementation 'com.github.kernel0x.finch:log-grpc:2.2.8'
releaseImplementation 'com.github.kernel0x.finch:log-grpc-noop:2.2.8'
// optional only for logs
debugImplementation 'com.github.kernel0x.finch:log:2.2.7'
releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.7'
debugImplementation 'com.github.kernel0x.finch:log:2.2.8'
releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.8'
}
````

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ internal class NetworkLogViewHolder(container: ViewGroup) : RecyclerView.ViewHol
view.context,
R.color.finch_status_300
)
networkLog.responseCode in 1..16 -> ContextCompat.getColor(
view.context,
R.color.finch_status_500
)
else -> ContextCompat.getColor(view.context, R.color.finch_status_default)
}
codeTextView.setTextColor(color)
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext.versions = [
minSdk : 21,
targetSdk : 34,
compileSdk : 34,
libraryVersion : '2.2.7',
libraryVersionCode: 14,
libraryVersion : '2.2.8',
libraryVersionCode: 15,

okhttp3 : '3.7.0',
gson : '2.8.2',
Expand Down
12 changes: 6 additions & 6 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ android {
}

dependencies {
//debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.7'
//releaseImplementation 'com.github.kernel0x.finch:noop:2.2.7'
//debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.7'
//releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.7'
//debugImplementation 'com.github.kernel0x.finch:log:2.2.7'
//releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.7'
//debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.8'
//releaseImplementation 'com.github.kernel0x.finch:noop:2.2.8'
//debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.8'
//releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.8'
//debugImplementation 'com.github.kernel0x.finch:log:2.2.8'
//releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.8'
debugImplementation project(":ui-drawer")
debugImplementation project(":log")
debugImplementation project(":log-okhttp")
Expand Down

0 comments on commit 6dd9fcc

Please sign in to comment.