Skip to content

Commit

Permalink
07/02/2024.
Browse files Browse the repository at this point in the history
  • Loading branch information
youndon committed Feb 7, 2024
1 parent 34c5742 commit 1861dde
Show file tree
Hide file tree
Showing 35 changed files with 454 additions and 350 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions app/src/main/java/city/zouitel/jetnote/NoteActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ import androidx.compose.runtime.*
import androidx.compose.ui.graphics.Color
import androidx.core.view.WindowCompat
import androidx.navigation.compose.rememberNavController
import city.zouitel.links.ui.LinkVM
import city.zouitel.navigation.Graph
import city.zouitel.navigation.checkShortcut
import city.zouitel.navigation.intentHandler
import city.zouitel.navigation.urlPreview
import city.zouitel.systemDesign.Cons.AUDIOS
import city.zouitel.systemDesign.Cons.IMAGES
import city.zouitel.systemDesign.DataStoreVM
import city.zouitel.widget.WidgetReceiver
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import kotlinx.coroutines.*
import org.koin.androidx.compose.koinViewModel
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import java.io.File
import java.util.*

class NoteActivity : ComponentActivity() {
class NoteActivity : ComponentActivity(), KoinComponent {

val linkViewModel: LinkVM by inject()

@SuppressLint("CoroutineCreationDuringComposition")
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -83,7 +87,7 @@ class NoteActivity : ComponentActivity() {

override fun onDestroy() {
super.onDestroy()
urlPreview(this, null, null, null, null, null, null)?.cleanUp()
linkViewModel.urlPreview(this, null, null, null, null)?.cleanUp()
}

override fun onStart() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/backup_rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
WidgetNote: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
Expand Down
26 changes: 15 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
agp = "8.2.1"
kotlin = "1.9.20"
kotlin = "1.9.22"
compileSdkVersion = "34"
minSdkVersion = "26"
targetSdkVersion = "34"
codeVersion = "402"
nameVersion = "4.0.2"
composeVersion = "1.5.4"
codeVersion = "403"
nameVersion = "4.0.3"
composeVersion = "1.5.8"

#Android.
core-ktx = "1.12.0"
Expand All @@ -22,26 +22,26 @@ startup = "1.1.1"

#Compose.
activity-compose = "1.8.2"
compose-bom = "2023.10.01"
compose-bom = "2024.01.00"
appcompat = "1.6.1"
material = "1.11.0"
navigation-compose = "2.7.6"
compose-constraintlayout = "1.1.0-alpha13"

#Plugins.
ksp = "1.9.21-1.0.16"
ksp = "1.9.22-1.0.17"
dependencyanalysis = "1.25.0"

#KotlinX.
serialization = "1.6.0"
serialization = "1.6.2"
coroutines = "1.7.3"

#Koin.
koin-core = "3.5.0"
koin-compose = "3.5.0"
koin-android = "3.5.0"
koin-core = "3.5.3"
koin-compose = "3.5.3"
koin-android = "3.5.3"
koin-worker = "3.5.0"
koin-test = "3.5.0"
koin-test = "3.5.3"
koin-gradle = "3.5.0"

#Room.
Expand Down Expand Up @@ -73,6 +73,8 @@ global-exception = "1.0.1"
url-preview = "1.0.1"
beetle = "2.0.1"
sqlcipher = "4.5.4"
waveslider = "0.0.3"
audiowaveform = "1.1.1"

[libraries]
# Kotlin.
Expand Down Expand Up @@ -162,6 +164,8 @@ swipe = { module = "me.saket.swipe:swipe", version.ref = "swipe" }
#globalexception = { module = "com.github.emirhankolver:GlobalExceptionHandler", version.ref = "global-exception" }
sketchbook = { module = "io.getstream:sketchbook", version.ref = "sketchbook" }
sqlcipher = { module = "net.zetetic:android-database-sqlcipher", version.ref = "sqlcipher" }
waveslider = { module = "com.github.galaxygoldfish:waveslider", version.ref = "waveslider" }
audiowaveform = { module = "com.github.lincollincol:compose-audiowaveform", version.ref = "audiowaveform" }

[bundles]
compose = ["ui", "ui-tooling-preview", "material3"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object Cons {
const val TAG = "This"
const val NUL = "null"

const val APP_VERSION = "4.0.2"
const val APP_VERSION = "4.0.3"

const val ID = "Id"
const val TITLE = "Title"
Expand Down
7 changes: 7 additions & 0 deletions ui/features/audios/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@ dependencies {

//AndroidX.
implementation(libs.constraintlayout)

//Swipe.
implementation(libs.swipe)

//Sliders.
implementation(libs.waveslider)
implementation(libs.audiowaveform)
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package city.zouitel.audios.di

import com.google.android.exoplayer2.ExoPlayer
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.androidx.viewmodel.dsl.viewModelOf
import org.koin.dsl.module
import city.zouitel.audios.MediaPlayerViewModel
import city.zouitel.audios.ui.MediaPlayerViewModel
import org.koin.core.module.dsl.singleOf
import city.zouitel.domain.exoplayer.*
import org.koin.dsl.bind
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package city.zouitel.audios
package city.zouitel.audios.ui

import android.content.Context
import androidx.compose.runtime.mutableLongStateOf
Expand All @@ -11,11 +11,10 @@ import java.text.SimpleDateFormat
import java.util.*

class MediaPlayerViewModel (
private val exoBuilder : ExoPlayerImpl,
private val exoBuilder : ExoPlayerImpl
): ViewModel() {

var getMediaDuration = mutableLongStateOf(0L)
private set
private var getMediaDuration = mutableLongStateOf(0L)

fun playMedia(mediaUri: String) {
viewModelScope.launch {
Expand Down
Loading

0 comments on commit 1861dde

Please sign in to comment.