Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14: Vector graphics mode and infinite canvas #19

Merged
merged 33 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b800474
SVG commands
shubertm Oct 1, 2023
c4624e9
SVG creating + parsing
shubertm Oct 5, 2023
39febc4
Merge remote-tracking branch 'origin/main' into graphic-notes
shubertm Oct 25, 2023
07c404e
Fix svg read/write + some refactors
shubertm Oct 26, 2023
a783848
Refactor repos and notes models
shubertm Oct 30, 2023
1b7bf94
Merge branch 'main' into graphic-notes
shubertm Oct 30, 2023
4679884
Improving graphic notes
shubertm Nov 8, 2023
6be6aea
Fix gradle build
shubertm Nov 8, 2023
8ae4e43
Merge main
shubertm Nov 9, 2023
39018e6
Fix build errors + deprecated API
shubertm Nov 16, 2023
211a347
Minor fixes + refactor
shubertm Nov 21, 2023
bd1dce5
Fix svg parsing
shubertm Nov 23, 2023
2feb09a
Merge branch 'main' into graphic-notes
shubertm Nov 23, 2023
9ab8c0d
Fix SVG to use proper data structure for commands
shubertm Nov 24, 2023
b1e0ff0
Refactor SVG command
shubertm Nov 25, 2023
9a038ac
Minor refactoring
kirillt Nov 27, 2023
9d08558
Update app/src/main/res/values/strings.xml
shubertm Nov 28, 2023
51edfda
Refactor SVG viewbox
shubertm Nov 29, 2023
964df38
Replace Stack with ArrayDeque
shubertm Nov 29, 2023
b32f933
Add type annotations to public SVG functions
shubertm Nov 29, 2023
77c66a8
Refactor SVG commands
shubertm Nov 29, 2023
4eac79d
Move local texts to string resource file
shubertm Nov 29, 2023
3858f14
Remove non-null assertions in NotesListAdapter
shubertm Nov 29, 2023
56e0e5f
Remove non-null assertions in MemoPreferencesImpl
shubertm Nov 29, 2023
a3bb1a5
Minor refactor
shubertm Nov 30, 2023
80fd06d
Check svg paths size
shubertm Dec 1, 2023
50a7117
Generalize file listing function
shubertm Dec 3, 2023
b433636
Refactor repos
shubertm Dec 3, 2023
a709241
Minor refactors
shubertm Dec 4, 2023
2de93c3
Fix extra line feed in text content
shubertm Dec 4, 2023
17d5097
Minor refactor
shubertm Dec 5, 2023
e41726d
Add extended fab
shubertm Dec 6, 2023
f6139b7
Minor refacotrs
shubertm Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: gradle

Expand Down
8 changes: 5 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
}

android {
namespace 'dev.arkbuilders.arkmemo'
compileSdk 33

defaultConfig {
Expand Down Expand Up @@ -62,13 +63,14 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures{
buildConfig true
viewBinding true
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="dev.arkbuilders.arkmemo">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/dev/arkbuilders/arkmemo/data/ResourceMeta.kt

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 22 additions & 0 deletions app/src/main/java/dev/arkbuilders/arkmemo/di/CoroutinesModule.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package dev.arkbuilders.arkmemo.di

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import javax.inject.Named
import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
object CoroutinesModule {

@Named(IO_DISPATCHER)
@Singleton
@Provides
fun provideDispatcher(): CoroutineDispatcher = Dispatchers.IO
}

const val IO_DISPATCHER = "iODispatcher"
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package dev.arkbuilders.arkmemo.di

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.arkbuilders.arklib.user.properties.PropertiesStorageRepo
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import javax.inject.Named
import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
object PropertiesStorageModule {

@Singleton
@Provides
@Named(STORAGE_SCOPE)
fun storageScope(
@Named(IO_DISPATCHER) dispatcher: CoroutineDispatcher
): CoroutineScope = CoroutineScope(dispatcher)

@Singleton
@Provides
fun propertiesStorageRepo(
@Named(STORAGE_SCOPE) storageScope: CoroutineScope
): PropertiesStorageRepo {
return PropertiesStorageRepo(storageScope)
}

const val STORAGE_SCOPE = "storageScope"
}
24 changes: 21 additions & 3 deletions app/src/main/java/dev/arkbuilders/arkmemo/di/RepositoryModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,33 @@ package dev.arkbuilders.arkmemo.di

import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.arkbuilders.arkmemo.data.repositories.TextNotesRepo
import dev.arkbuilders.arkmemo.data.repositories.TextNotesRepoImpl
import dev.arkbuilders.arklib.user.properties.PropertiesStorageRepo
import dev.arkbuilders.arkmemo.repo.graphics.GraphicNotesRepo
import dev.arkbuilders.arkmemo.repo.NotesRepo
import dev.arkbuilders.arkmemo.repo.text.TextNotesRepo
import dev.arkbuilders.arkmemo.models.GraphicNote
import dev.arkbuilders.arkmemo.models.TextNote
import dev.arkbuilders.arkmemo.preferences.MemoPreferences
import dev.arkbuilders.arkmemo.repo.NotesRepoHelper


@InstallIn(SingletonComponent::class)
@Module
abstract class RepositoryModule {
@Binds
abstract fun bindRepository(impl: TextNotesRepoImpl): TextNotesRepo
abstract fun bindTextNotesRepo(impl: TextNotesRepo): NotesRepo<TextNote>

@Binds
abstract fun bindGraphicNotesRepo(impl: GraphicNotesRepo): NotesRepo<GraphicNote>

companion object {
@Provides
fun provideNotesRepoHelper(
memoPreferences: MemoPreferences,
propertiesStorageRepo: PropertiesStorageRepo
) = NotesRepoHelper(memoPreferences, propertiesStorageRepo)
}
}

This file was deleted.

Loading