Skip to content

Commit

Permalink
Bump version (#132)
Browse files Browse the repository at this point in the history
* Bump version
* Improve padding of loader in categories screen
* Increase cache size & make them constant variables
* Update full_description.txt in fastlane
* Update short_description.txt in fastlane
---------
Signed-off-by: starry-shivam <[email protected]>
  • Loading branch information
starry-shivam authored Mar 21, 2024
1 parent 0adbbe3 commit e8ab543
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ android {
applicationId "com.starry.myne"
minSdk 26
targetSdk 34
versionCode 310
versionName "3.1.0"
versionCode 320
versionName "3.2.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/com/starry/myne/repo/BookRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine

class CacheInterceptor : Interceptor {

companion object {
const val CACHE_SIZE = 32L * 1024L * 1024L // 32 MiB
private const val CACHE_MAX_AGE = 10 // 10 days
}

override fun intercept(chain: Interceptor.Chain): Response {
val response: Response = chain.proceed(chain.request())
val cacheControl = CacheControl.Builder()
.maxAge(10, TimeUnit.DAYS)
.maxAge(CACHE_MAX_AGE, TimeUnit.DAYS)
.build()
return response.newBuilder()
.header("Cache-Control", cacheControl.toString())
Expand All @@ -67,7 +73,7 @@ class BookRepository(context: Context) {
.connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS)
.readTimeout(100, TimeUnit.SECONDS)
.cache(Cache(File(context.cacheDir, "http-cache"), 16L * 1024L * 1024L)) // 16 MiB
.cache(Cache(File(context.cacheDir, "http-cache"), CacheInterceptor.CACHE_SIZE))
.addNetworkInterceptor(CacheInterceptor())
.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ fun CategoryDetailScaffold(
.padding(it)
) {
if (state.page == 1L && state.isLoading) {
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Box(
modifier = Modifier
.fillMaxSize()
.padding(bottom = 75.dp),
contentAlignment = Alignment.Center
) {
CircularProgressIndicator(color = MaterialTheme.colorScheme.primary)
}
} else if (!state.isLoading && state.error != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material3.Scaffold
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material.icons.outlined.Share
Expand All @@ -48,6 +47,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.selection.selectable
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material3.OutlinedButton
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DrawerValue
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
Expand All @@ -64,6 +63,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.ModalNavigationDrawer
import androidx.compose.material3.NavigationDrawerItem
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.RadioButton
import androidx.compose.material3.RadioButtonDefaults
import androidx.compose.material3.Scaffold
Expand Down
6 changes: 6 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/320.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Switch to the internal files directory for storing books instead of external download directory.
- Fixed books not getting saved in the library when using with multi user mode / work profiles.
- Added Chinese translations, thanks to @WeiguangTWK
- Added Brazilian Portuguese translations, thanks to @guiBrisson
- Updated Russian translations, thanks to @Palvenok
- Some other minor bug fixes and improvements.
4 changes: 2 additions & 2 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Myne is a FOSS Android application to download ebooks from the Project GutenBerg, it uses GutenDex API to fetch metadata of ebooks in the backend.
Myne is a FOSS Android application to download & read ebooks from the Project GutenBerg, it uses GutenDex API to fetch metadata of ebooks in the backend.

Highlights:

Expand All @@ -10,4 +10,4 @@ Highlights:
- Comes in both light and dark mode.
- MAD: UI and logic written with pure Kotlin. Single activity, no fragments, only composable destinations.

PS: *The name of the app is inspired from the main character of an anime called Ascendance of a Bookworm.*
PS: *The name of the app is inspired from the main character of an anime called Ascendance of a Bookworm.*
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Android application to download ebooks from the Project GutenBerg.
Android application to download & read ebooks from the Project GutenBerg.

0 comments on commit e8ab543

Please sign in to comment.