This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/build.gradle.kts b/app/build.gradle.kts | |
index 802e8972..cabd0452 100644 | |
--- a/app/build.gradle.kts | |
+++ b/app/build.gradle.kts | |
@@ -70,23 +70,23 @@ android { | |
val syncLibs by tasks.registering(Sync::class) { | |
into("src/main/jniLibs") | |
- into("armeabi-v7a") { | |
+ into("arm64-v8a") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console:/ # df | |
Filesystem 1K-blocks Used Available Use% Mounted on | |
tmpfs 1014480 1020 1013460 1% /dev | |
tmpfs 1014480 0 1014480 0% /mnt | |
/dev/block/vdd1 11248 132 11116 2% /metadata | |
/dev/block/dm-4 766572 764240 2332 100% / | |
/dev/block/dm-3 149204 148748 456 100% /vendor | |
/dev/block/dm-2 1466760 1462368 4392 100% /product | |
/dev/block/dm-1 175596 175068 528 100% /system_ext | |
tmpfs 1014480 12 1014468 1% /apex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt b/app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt | |
index 81b3b8d..7529c8a 100644 | |
--- a/app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt | |
+++ b/app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt | |
@@ -42,7 +42,7 @@ class GithubRepository( | |
// appending '%' so we can allow other characters to be before and after the query string | |
val dbQuery = "%${query.replace(' ', '%')}%" | |
- val pagingSourceFactory = { database.reposDao().reposByName(dbQuery) } | |
+ val pagingSourceFactory = { database.reposDao().reposByIdx(dbQuery) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+---------+--------------+---------+ | |
| prev: 0 | repo 001 | next: 2 | | |
+---------+--------------+---------+ | |
| prev: 1 | repo 087 | next: 3 | | |
+---------+--------------+---------+ | |
| prev: 0 | repo 002 | next: 2 | | |
+---------+--------------+---------+ | |
... | |
+---------+--------------+---------+ | |
| prev: 1 | repo 056 | next: 3 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+---------+--------------+---------+ | |
| prev: 0 | repo 001 | next: 2 | | |
+---------+--------------+---------+ | |
| prev: 0 | repo 002 | next: 2 | | |
+---------+--------------+---------+ | |
| prev: 0 | repo 003 | next: 2 | | |
+---------+--------------+---------+ | |
... | |
+---------+--------------+---------+ | |
| prev: 0 | repo 048 | next: 2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface RepoDao { | |
@Query("SELECT * FROM repos WHERE " + | |
"name LIKE :queryString OR description LIKE :queryString " + | |
"ORDER BY stars DESC, name ASC") | |
fun reposByName(queryString: String): PagingSource<Int, Repo> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GithubRepository { | |
fun getSearchResultStream(query: String): Flow<PagingData<Repo>> { | |
val dbQuery = "%${query.replace(' ', '%')}%" | |
val pagingSourceFactory = { database.reposDao().reposByName(dbQuery)} | |
return Pager( | |
config = PagingConfig(pageSize = NETWORK_PAGE_SIZE, enablePlaceholders = false), | |
remoteMediator = GithubRemoteMediator(query, service, database), | |
pagingSourceFactory = pagingSourceFactory | |
).flow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface GithubService { | |
/** | |
* Get repos ordered by stars. | |
*/ | |
@GET("search/repositories?sort=stars") | |
suspend fun searchRepos( | |
@Query("q") query: String, | |
@Query("page") page: Int, | |
@Query("per_page") itemsPerPage: Int | |
): RepoSearchResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt b/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt | |
index 16ac44a..61d77ca 100644 | |
--- a/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt | |
+++ b/app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt | |
@@ -55,7 +55,11 @@ class SearchRepositoriesViewModel(private val repository: GithubRepository) : Vi | |
if (before == null) { | |
// we're at the beginning of the list | |
- return@insertSeparators UiModel.SeparatorItem("${after.roundedStarCount}0.000+ stars") | |
+ if (after.roundedStarCount >= 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Download magisk.zip and unzip | |
* Rename x86/magiskboot to x86/magiskboot.real | |
* Add x86/magiskboot | |
* Add x86/mboot (https://github.com/shakalaca/MagiskOnIntelDevices/raw/master/mboot) | |
* ZIP and update from MagiskManager custom channel (modify https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/debug.json) |
NewerOlder