Skip to content

Commit

Permalink
18/04/2023.
Browse files Browse the repository at this point in the history
  • Loading branch information
youndon committed Apr 18, 2023
1 parent 81cfd8f commit 8638a6b
Show file tree
Hide file tree
Showing 25 changed files with 73 additions and 79 deletions.
8 changes: 6 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
applicationId = "city.zouitel.jetnote"
minSdk = 25
targetSdk = 33
versionCode = 220
versionName = "2.2.0"
versionCode = 221
versionName = "2.2.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -160,6 +160,10 @@ dependencies {
// implementation (libs.glide.comp)
// kapt (libs.glide.compiler)

//Coil.
implementation(libs.coil.compose)
implementation(libs.coil.svg)

// //License.
implementation (libs.aboutlibraries.comp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.common_ui.Cons.APP_NAME
import com.example.common_ui.Cons.APP_VERSION
import com.example.common_ui.MatColors.Companion.ON_SURFACE
import com.example.common_ui.MaterialColors.Companion.ON_SURFACE
import com.example.mobile.getMaterialColor

@Composable
Expand All @@ -21,7 +21,7 @@ fun AboutContent() {
)
}

val about = "$APP_NAME a note-taking and todo management open-source application.\n\n" +
val about = "$APP_NAME is a note-taking and todo management open-source application.\n\n" +
" It is developed by City-Zouitel organization on github.\n\n" +
" And It is intended for archiving and creating notes in which photos," +
" audio and saved web links, numbers and map locations.\n\n" +
Expand Down
16 changes: 9 additions & 7 deletions app/src/main/java/com/example/mobile/about_screen/AboutLabel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import androidx.compose.ui.draw.blur
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.AsyncImage
import com.example.common_ui.Cons.APP_NAME
import com.example.common_ui.MatColors.Companion.ON_SURFACE
import com.example.common_ui.MaterialColors.Companion.ON_SURFACE
import com.example.common_ui.R
import com.example.mobile.getMaterialColor


Expand All @@ -25,16 +27,16 @@ fun AboutLabel() {
.fillMaxWidth()
.height(200.dp)
) {
GlideImage(
com.example.common_ui.R.drawable.mat,
contentDescription = "",
contentScale = ContentScale.FillBounds,
AsyncImage(
model = R.drawable.mat,
contentDescription = null,
contentScale = ContentScale.FillBounds,
modifier = Modifier
.fillMaxWidth()
.blur(
radius = 3.dp,
radius = 4.dp,
edgeTreatment = BlurredEdgeTreatment.Rectangle
),
)
)
Text(
text = APP_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import androidx.hilt.navigation.compose.hiltViewModel
import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.Icons.GITHUB_ICON
import com.example.common_ui.MatColors.Companion.ON_SURFACE
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.ON_SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.graph.sound

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.navigation.NavController
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.mobile.navigation_drawer.NavigationDrawer
import com.example.mobile.top_action_bar.CustomTopAppBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import com.example.common_ui.Icons.DISK_ICON
import com.example.common_ui.Icons.ERASER_BLACK_ICON
import com.example.common_ui.Icons.REDO_ICON
import com.example.common_ui.Icons.UNDO_ICON
import com.example.common_ui.MatColors.Companion.ON_SURFACE
import com.example.common_ui.MatColors.Companion.OUTLINE
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.ON_SURFACE
import com.example.common_ui.MaterialColors.Companion.OUTLINE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.note.NoteVM
import io.getstream.sketchbook.ColorPickerDialog
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/example/mobile/getMaterialColor.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.example.mobile

import com.example.common_ui.MatColors
import com.example.common_ui.MaterialColors

internal val getMaterialColor = MatColors().getMaterialColor
internal val getMaterialColor = MaterialColors().getMaterialColor
4 changes: 2 additions & 2 deletions app/src/main/java/com/example/mobile/home_screen/NoteHome.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import com.example.common_ui.Cons.ORDER_BY_PRIORITY
import com.example.common_ui.Cons.ORDER_BY_REMINDER
import com.example.common_ui.Cons.SEARCH_IN_LOCAL
import com.example.common_ui.Icons.PLUS_ICON
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MatColors.Companion.SURFACE_VARIANT
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE_VARIANT
import com.example.common_ui.VerticalGrid
import com.example.mobile.getMaterialColor
import com.example.mobile.navigation_drawer.NavigationDrawer
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/example/mobile/note_card/NoteCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import com.example.links.LinkVM
import com.example.links.NoteAndLinkVM
import com.example.local.model.*
import com.example.note.NoteVM
import com.example.note.UrlCard
import com.example.tasks.NoteAndTodoVM
import com.example.tasks.TodoVM
import me.saket.swipe.SwipeAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import androidx.navigation.NavController
import com.example.common_ui.AdaptingRowBetween
import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.MatColors.Companion.ON_SURFACE
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.ON_SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.mobile.navigation_drawer.NavigationDrawer
import com.example.graph.sound
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import com.example.common_ui.Cons.KEY_INVALID
import com.example.common_ui.DataStoreVM
import com.example.common_ui.Icons.CIRCLE_ICON_18
import com.example.common_ui.Icons.CROSS_ICON
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.graph.sound
import com.example.local.model.Label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.Icons.BROOM_ICON
import com.example.common_ui.Icons.MENU_BURGER_ICON
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.mobile.getMaterialColor
import com.example.graph.sound
import com.example.local.model.Label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.MatColors.Companion.SURFACE_TINT
import com.example.common_ui.MaterialColors.Companion.SURFACE_TINT
import com.example.mobile.getMaterialColor
import com.example.graph.sound

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.example.common_ui.Cons.JPEG
import com.example.common_ui.Cons.MP3
import com.example.common_ui.Cons.SEARCH_IN_TRASH
import com.example.common_ui.DataStoreVM
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.common_ui.VerticalGrid
import com.example.links.LinkVM
import com.example.links.NoteAndLinkVM
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 = "2.2.0"
const val APP_VERSION = "2.2.1"

const val NOTE_TABLE_NAME = "Notes"
const val DATABASE_NAME = "JetNoteDatabase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color

class MatColors {
class MaterialColors {

companion object {
const val SURFACE = "SURFACE"
Expand Down
6 changes: 3 additions & 3 deletions ui/features/note/src/main/java/com/example/note/ColorsRow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.MatColors
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.common_ui.SoundEffect

@Composable
Expand All @@ -34,7 +34,7 @@ fun ColorsRow(
val ctx = LocalContext.current
val thereIsSoundEffect = remember(dataStoreVM, dataStoreVM::getSound).collectAsState()

val getMatColor = MatColors().getMaterialColor
val getMatColor = MaterialColors().getMaterialColor
val sound = SoundEffect()

LazyRow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import androidx.core.net.toUri
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavController
import com.example.common_ui.*
import com.example.common_ui.Cons.ADD_ROUTE
import com.example.common_ui.Cons.AUDIOS
import com.example.common_ui.Cons.HOME_ROUTE
import com.example.common_ui.Cons.IMAGES
Expand All @@ -56,8 +55,8 @@ import com.example.common_ui.Cons.NON
import com.example.common_ui.Cons.NUL
import com.example.common_ui.Icons.CIRCLE_ICON_18
import com.example.common_ui.Icons.DONE_ICON
import com.example.common_ui.MatColors.Companion.OUT_LINE_VARIANT
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.OUT_LINE_VARIANT
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.links.CacheLinks
import com.example.links.LinkPart
import com.example.links.LinkVM
Expand Down Expand Up @@ -106,7 +105,7 @@ fun NoteAdd(
val focusRequester = FocusRequester()
val focusState = remember { mutableStateOf(false) }

val getMatColor = MatColors().getMaterialColor
val getMatColor = MaterialColors().getMaterialColor

val sound = SoundEffect()
val thereIsSoundEffect = remember(dataStoreVM, dataStoreVM::getSound).collectAsState()
Expand Down Expand Up @@ -206,8 +205,8 @@ fun NoteAdd(

noteVM.addNote(
Note(
title = titleState.value,
description = descriptionState.value,
title = if(titleState.value.isNullOrBlank()) null else titleState.value ,
description = if(descriptionState.value.isNullOrBlank()) null else descriptionState.value,
priority = priorityState.value,
uid = uid,
reminding = remindingValue.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import com.example.common_ui.Cons.FOCUS_NAVIGATION
import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.Icons.ADD_CIRCLE_ICON
import com.example.common_ui.Icons.BELL_ICON
import com.example.common_ui.MatColors.Companion.SURFACE
import com.example.common_ui.MatColors.Companion.SURFACE_VARIANT
import com.example.common_ui.MaterialColors.Companion.SURFACE
import com.example.common_ui.MaterialColors.Companion.SURFACE_VARIANT
import com.example.local.model.Note
import com.example.note.ColorsRow

Expand Down Expand Up @@ -50,7 +50,7 @@ fun AddEditBottomBar(
val ctx = LocalContext.current
val thereIsSoundEffect = remember(dataStoreVM, dataStoreVM::getSound).collectAsState()

val getMatColor = MatColors().getMaterialColor
val getMatColor = MaterialColors().getMaterialColor
val sound = SoundEffect()

Column {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import com.example.common_ui.Cons.KEY_CLICK
import com.example.common_ui.DataStoreVM
import com.example.common_ui.Icons.REDO_ICON
import com.example.common_ui.Icons.UNDO_ICON
import com.example.common_ui.MatColors
import com.example.common_ui.MatColors.Companion.SURFACE_VARIANT
import com.example.common_ui.MaterialColors
import com.example.common_ui.MaterialColors.Companion.SURFACE_VARIANT
import com.example.common_ui.SoundEffect

@Composable
Expand All @@ -32,7 +32,7 @@ fun UndoRedo(
val ctx = LocalContext.current
val thereIsSoundEffect = remember(dataStoreVM, dataStoreVM::getSound).collectAsState()

val getMatColor = MatColors().getMaterialColor
val getMatColor = MaterialColors().getMaterialColor
val sound = SoundEffect()

Icon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import com.example.common_ui.Cons.MP3
import com.example.common_ui.Cons.NUL
import com.example.common_ui.Icons.CIRCLE_ICON_18
import com.example.common_ui.Icons.EDIT_ICON
import com.example.common_ui.MatColors.Companion.OUT_LINE_VARIANT
import com.example.common_ui.MaterialColors.Companion.OUT_LINE_VARIANT
import com.example.links.CacheLinks
import com.example.links.LinkPart
import com.example.links.LinkVM
Expand Down Expand Up @@ -118,7 +118,7 @@ fun NoteEdit(
val observeNoteAndTodo =
remember(noteAndTodoVM, noteAndTodoVM::getAllNotesAndTodo).collectAsState()

val getMatColor = MatColors().getMaterialColor
val getMatColor = MaterialColors().getMaterialColor
val sound = SoundEffect()

val titleState = rememberSaveable {
Expand Down Expand Up @@ -193,8 +193,8 @@ fun NoteEdit(

noteVM.updateNote(
Note(
title = titleState.value,
description = descriptionState.value,
title = if(titleState.value.isNullOrBlank()) null else titleState.value ,
description = if(descriptionState.value.isNullOrBlank()) null else descriptionState.value,
priority = priorityState.value,
uid = uid,
audioDuration = audioDuration,
Expand Down
Loading

0 comments on commit 8638a6b

Please sign in to comment.