Skip to content

Commit

Permalink
Merge pull request #154 from hotwired/ci-lint
Browse files Browse the repository at this point in the history
Address CI lint errors
  • Loading branch information
jayohms authored Feb 24, 2021
2 parents 9930d03 + a4814ff commit 24b0559
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Run lint
run: ./gradlew turbo:lint

- name: Run tests
run: ./gradlew testRelease

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ class TurboUriHelper(val context: Context) {
}

private fun uriAttributesFromContentQuery(uri: Uri, mimeType: String?, cursor: Cursor): TurboUriAttributes? {
val fileName: String? = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME))
val fileSize: Long = cursor.getLong(cursor.getColumnIndex(OpenableColumns.SIZE))
val columnName = cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME)
val columnSize = cursor.getColumnIndexOrThrow(OpenableColumns.SIZE)
val fileName: String? = cursor.getString(columnName)
val fileSize: Long = cursor.getLong(columnSize)

if (fileName == null && mimeType == null) {
return null
Expand Down

0 comments on commit 24b0559

Please sign in to comment.