Skip to content

Commit

Permalink
Navigation changes
Browse files Browse the repository at this point in the history
Fixes issue with argument encoding in uri
  • Loading branch information
massivemadness committed Feb 10, 2025
1 parent a594b96 commit 9862f6f
Show file tree
Hide file tree
Showing 87 changed files with 399 additions and 568 deletions.
9 changes: 7 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@
</provider>

<service
android:name=".feature.explorer.ui.service.FileService"
android:name=".feature.explorer.ui.service.TaskService"
android:foregroundServiceType="dataSync"
android:exported="false" />
android:exported="false">
<intent-filter>
<action android:name="com.blacksquircle.ui.ACTION_START_TASK" />
<action android:name="com.blacksquircle.ui.ACTION_CANCEL_TASK" />
</intent-filter>
</service>

<profileable
android:shell="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ internal class MainActivity : AppCompatActivity() {
private val viewModel by viewModels<MainViewModel> { viewModelProvider.get() }

override fun onCreate(savedInstanceState: Bundle?) {
AppComponent.buildOrGet(this).inject(this)
installSplashScreen()
AppComponent.buildOrGet(this).inject(this)
super.onCreate(savedInstanceState)
val binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ package com.blacksquircle.ui.application.viewmodel
import android.content.Intent
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.blacksquircle.ui.core.mvi.ViewEvent
import com.blacksquircle.ui.core.storage.keyvalue.SettingsManager
import com.blacksquircle.ui.feature.editor.api.interactor.EditorInteractor
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.launch
import javax.inject.Inject

Expand All @@ -33,13 +29,8 @@ internal class MainViewModel @Inject constructor(
private val editorInteractor: EditorInteractor,
) : ViewModel() {

private val _viewEvent = Channel<ViewEvent>(Channel.BUFFERED)
val viewEvent: Flow<ViewEvent> = _viewEvent.receiveAsFlow()

val fullScreenMode: Boolean
get() = settingsManager.fullScreenMode
val confirmExit: Boolean
get() = settingsManager.confirmExit

fun handleIntent(intent: Intent?) {
viewModelScope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.blacksquircle.ui.internal.di

import android.content.Context
import com.blacksquircle.ui.application.activity.MainActivity
import com.blacksquircle.ui.application.fragment.TwoPaneFragment
import com.blacksquircle.ui.core.internal.CoreApiDepsProvider
import com.blacksquircle.ui.core.internal.CoreModule
import com.blacksquircle.ui.feature.editor.api.internal.EditorApiDepsProvider
Expand Down Expand Up @@ -60,7 +59,6 @@ internal interface AppComponent :
ThemesApiDepsProvider {

fun inject(activity: MainActivity)
fun inject(fragment: TwoPaneFragment)

@Component.Factory
interface Factory {
Expand Down
42 changes: 0 additions & 42 deletions app/src/main/res/layout-sw600dp-land/fragment_two_pane.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
android:layout_height="match_parent"
android:id="@+id/nav_host"
android:name="androidx.navigation.fragment.NavHostFragment"
app:navGraph="@navigation/app_nav_graph"
app:navGraph="@navigation/app_graph"
app:defaultNavHost="true" />
45 changes: 0 additions & 45 deletions app/src/main/res/layout/fragment_two_pane.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,8 @@

<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/app_nav_graph"
app:startDestination="@id/twoPaneFragment">

<fragment
android:id="@+id/twoPaneFragment"
android:name="com.blacksquircle.ui.application.fragment.TwoPaneFragment"
tools:layout="@layout/fragment_two_pane" >
<action
android:id="@+id/to_confirmExitDialog"
app:destination="@id/confirmExitDialog" />
</fragment>

<dialog
android:id="@+id/confirmExitDialog"
android:name="com.blacksquircle.ui.application.dialog.ConfirmExitDialog"
android:label="@string/pref_confirm_exit_title">
<deepLink app:uri="blacksquircle://exit" />
</dialog>
android:id="@+id/app_graph"
app:startDestination="@id/editor_graph">

<include
android:id="@+id/editor_graph"
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
-->
<resources>
<string name="action_restart">Neu starten</string>
<string name="action_yes">Ja</string>
<string name="action_no">Nein</string>
<string name="dialog_title_exit">Verlassen</string>
<string name="dialog_message_exit">Sind Sie sicher, dass Sie die App verlassen wollen? Alle Änderungen werden im Cache gespeichert</string>
<string name="message_in_app_update_ready">App kann aktualisiert werden</string>
<string name="message_in_app_update_failed">Installation des Updates fehlgeschlagen</string>
</resources>
4 changes: 0 additions & 4 deletions app/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
-->
<resources>
<string name="action_restart">Restart</string>
<string name="action_yes">Yes</string>
<string name="action_no">No</string>
<string name="dialog_title_exit">Exit</string>
<string name="dialog_message_exit">Are you sure you want to exit? All changes will be saved into a cache</string>
<string name="message_in_app_update_ready">App is ready to update</string>
<string name="message_in_app_update_failed">Update installation failed</string>
</resources>
4 changes: 0 additions & 4 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
-->
<resources>
<string name="action_restart">Reinicio</string>
<string name="action_yes">Aceptar</string>
<string name="action_no">Rechazar</string>
<string name="dialog_title_exit">Salir</string>
<string name="dialog_message_exit">¿Seguro que quieres salir? Se guardarán todos los cambios en la caché</string>
<string name="message_in_app_update_ready">La app tiene una actualización disponible</string>
<string name="message_in_app_update_failed">No se pudo instalar la actualización</string>
</resources>
4 changes: 0 additions & 4 deletions app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
-->
<resources>
<string name="action_restart">Käynnistä uudelleen</string>
<string name="action_yes">Kyllä</string>
<string name="action_no">Ei</string>
<string name="dialog_title_exit">Poistu</string>
<string name="dialog_message_exit">Oletko varma, että haluat poistua? Kaikki muutokset tallennetaan välimuistiin</string>
<string name="message_in_app_update_ready">Sovellus on valmis päivitettäväksi</string>
<string name="message_in_app_update_failed">Päivityksen asennus epäonnistui</string>
</resources>
Loading

0 comments on commit 9862f6f

Please sign in to comment.