Skip to content

Commit

Permalink
Merge changes last nightly
Browse files Browse the repository at this point in the history
This is the last nightly before the 3.0.0 release
Expect bugs (do not report yet)
Might require app data clear or reinstall

The built-in image editor is currently disabled as is facing a major re-work

Includes, but not limited to:
- Settings for auto-hide search/navigation bar
- Switched from coil to sketch for image loading
- Switched from zoomable to zoomimage/sketch for image subsampling
- Reduced unecessary recompositions
- Added total 'Images & Videos' counter at the bottom of the Album screen
- Added total Album media size after counter (eg: 1011 items (628.20MB))
- Improved Album sorting UI
- Improvements to Vault (now limited to Images only)
- Improvements to Ignored Albums
* New Setup UI for creating new Ignored Albums
* Added wildcard patterns (Regex) for hiding multiple albums at once
* Added visibility option for hiding the albums (and it's medie content) either only in timeline, album screens or both
* Added more information about the created Ignored Albums
- Re-arranged Settings screen
- Updated major dependecies
- Added avif support
- Improved video player

Signed-off-by: IacobIonut01 <[email protected]>
  • Loading branch information
IacobIonut01 committed Aug 16, 2024
1 parent dc02965 commit 1c2fcf3
Show file tree
Hide file tree
Showing 168 changed files with 7,982 additions and 2,236 deletions.
32 changes: 20 additions & 12 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ plugins {
alias(libs.plugins.baselineProfilePlugin)
alias(libs.plugins.kotlin.compose.compiler)
id("kotlin-parcelize")
alias(libs.plugins.kotlinSerialization)
}

android {
namespace = "com.dot.gallery"
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.dot.gallery"
minSdk = 30
targetSdk = 34
versionCode = 30013
targetSdk = 35
versionCode = 30024
versionName = "3.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -136,6 +137,7 @@ dependencies {
implementation(libs.compose.ui.graphics)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.material.icons.extended)
implementation(libs.androidx.graphics.shapes)

// Compose - Shimmer
implementation(libs.compose.shimmer)
Expand All @@ -155,6 +157,8 @@ dependencies {
implementation(libs.kotlinx.coroutines.core)
runtimeOnly(libs.kotlinx.coroutines.android)

implementation(libs.kotlinx.serialization.json)

// Dagger - Hilt
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.dagger.hilt)
Expand All @@ -169,14 +173,18 @@ dependencies {
implementation(libs.room.ktx)

// Coil
implementation(libs.coil.compose)
implementation(libs.coil.svg)
implementation(libs.coil.gif)
implementation(libs.coil.video)
implementation(libs.jxl.coder.coil)
implementation(libs.coil.network.okhttp)
implementation(libs.avif.coder.coil)

// Sketch
implementation(libs.sketch.compose)
implementation(libs.sketch.view)
implementation(libs.sketch.animated)
implementation(libs.sketch.extensions.compose)
implementation(libs.sketch.http.ktor)
implementation(libs.sketch.svg)
implementation(libs.sketch.video)

// Exo Player
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.ui)
Expand All @@ -188,9 +196,6 @@ dependencies {
// Exif Interface
implementation(libs.androidx.exifinterface)

// Zoomable
implementation(libs.zoomable)

// Datastore Preferences
implementation(libs.datastore.prefs)

Expand All @@ -204,7 +209,7 @@ dependencies {
implementation(libs.pinchzoomgrid)

// Subsampling
implementation(libs.zoomable.image.coil)
implementation(libs.zoomimage.sketch)

// Splashscreen
implementation(libs.androidx.core.splashscreen)
Expand All @@ -213,6 +218,9 @@ dependencies {
implementation(libs.androidx.security.crypto)
implementation(libs.androidx.biometric)

// Composables - Core
implementation(libs.core)

// Tests
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
Expand Down
20 changes: 20 additions & 0 deletions app/compose_compiler_config.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
com.github.panpf.sketch.Sketch
com.github.panpf.sketch.PlatformContext
com.github.panpf.sketch.drawable.DrawableEqualizer
com.github.panpf.sketch.request.Image
com.github.panpf.sketch.request.ImageOptions
com.github.panpf.sketch.request.ImageRequest
com.github.panpf.sketch.request.ImageResult
com.github.panpf.sketch.state.ColorDrawableStateImage
com.github.panpf.sketch.state.CurrentStateImage
com.github.panpf.sketch.state.DrawableStateImage
com.github.panpf.sketch.state.ErrorStateImage
com.github.panpf.sketch.state.MemoryCacheStateImage
com.github.panpf.sketch.state.IconAnimatableStateImage
com.github.panpf.sketch.state.IconStateImage
com.github.panpf.sketch.state.StateImage
com.github.panpf.sketch.state.ThumbnailMemoryCacheStateImage
com.github.panpf.sketch.util.ColorFetcher
com.github.panpf.sketch.util.Equalizer
com.github.panpf.sketch.util.IntColor
com.github.panpf.sketch.util.Size
3 changes: 2 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

-dontwarn org.bouncycastle.jsse.**
-dontwarn org.conscrypt.**
-dontwarn org.openjsse.**
-dontwarn org.openjsse.**
-dontwarn org.slf4j.impl.StaticLoggerBinder
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "b923fda23747db68de4db23fb2360ff8",
"entities": [
{
"tableName": "pinned_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "blacklist",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `label` TEXT NOT NULL, `wildcard` TEXT, `location` INTEGER NOT NULL DEFAULT 0, `matchedAlbums` TEXT NOT NULL DEFAULT '[]', PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "label",
"columnName": "label",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "wildcard",
"columnName": "wildcard",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "location",
"columnName": "location",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "matchedAlbums",
"columnName": "matchedAlbums",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'[]'"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b923fda23747db68de4db23fb2360ff8')"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "b923fda23747db68de4db23fb2360ff8",
"entities": [
{
"tableName": "pinned_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "blacklist",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `label` TEXT NOT NULL, `wildcard` TEXT, `location` INTEGER NOT NULL DEFAULT 0, `matchedAlbums` TEXT NOT NULL DEFAULT '[]', PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "label",
"columnName": "label",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "wildcard",
"columnName": "wildcard",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "location",
"columnName": "location",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "matchedAlbums",
"columnName": "matchedAlbums",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'[]'"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b923fda23747db68de4db23fb2360ff8')"
]
}
}
11 changes: 6 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<activity
android:name=".feature_node.presentation.main.MainActivity"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize|uiMode"
android:theme="@style/Theme.Gallery.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -73,7 +73,7 @@
android:name=".feature_node.presentation.standalone.StandaloneActivity"
android:exported="true"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize|uiMode"
android:theme="@style/Theme.Gallery">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -119,7 +119,7 @@
android:name=".feature_node.presentation.picker.PickerActivity"
android:exported="true"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize|uiMode"
android:theme="@style/Theme.Gallery">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.PICK"/>
Expand All @@ -138,7 +138,7 @@
<activity
android:name=".feature_node.presentation.wallpaper.SetWallpaperActivity"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize|uiMode"
android:launchMode="singleInstance">
<intent-filter android:label="@string/set_wallpaper">
<action android:name="android.intent.action.ATTACH_DATA"/>
Expand All @@ -149,7 +149,8 @@

<activity
android:name=".feature_node.presentation.edit.EditActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize|uiMode"
android:enabled="false"
android:exported="true">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.EDIT"/>
Expand Down
43 changes: 42 additions & 1 deletion app/src/main/kotlin/com/dot/gallery/GalleryApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,48 @@
package com.dot.gallery

import android.app.Application
import com.dot.gallery.core.decoder.supportHeifDecoder
import com.dot.gallery.core.decoder.supportJxlDecoder
import com.github.panpf.sketch.PlatformContext
import com.github.panpf.sketch.SingletonSketch
import com.github.panpf.sketch.Sketch
import com.github.panpf.sketch.cache.DiskCache
import com.github.panpf.sketch.cache.MemoryCache
import com.github.panpf.sketch.decode.supportAnimatedGif
import com.github.panpf.sketch.decode.supportAnimatedHeif
import com.github.panpf.sketch.decode.supportAnimatedWebp
import com.github.panpf.sketch.decode.supportSvg
import com.github.panpf.sketch.decode.supportVideoFrame
import com.github.panpf.sketch.http.KtorStack
import com.github.panpf.sketch.request.supportPauseLoadWhenScrolling
import com.github.panpf.sketch.request.supportSaveCellularTraffic
import com.github.panpf.sketch.util.appCacheDirectory
import dagger.hilt.android.HiltAndroidApp
import okio.FileSystem

@HiltAndroidApp
class GalleryApp : Application()
class GalleryApp : Application(), SingletonSketch.Factory {

override fun createSketch(context: PlatformContext): Sketch = Sketch.Builder(this).apply {
httpStack(KtorStack())
components {
supportSaveCellularTraffic()
supportPauseLoadWhenScrolling()
supportSvg()
supportVideoFrame()
supportAnimatedGif()
supportAnimatedWebp()
supportAnimatedHeif()
supportHeifDecoder()
supportJxlDecoder()
}
val diskCache = DiskCache.Builder(context, FileSystem.SYSTEM)
.directory(context.appCacheDirectory())
.maxSize(150 * 1024 * 1024).build()

resultCache(diskCache)
downloadCache(diskCache)
memoryCache(MemoryCache.Builder(context).maxSizePercent(0.75).build())
}.build()

}
Loading

0 comments on commit 1c2fcf3

Please sign in to comment.