Skip to content

Commit

Permalink
Navigation fixes
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Feb 29, 2024
1 parent a94195f commit a3da70e
Show file tree
Hide file tree
Showing 17 changed files with 254 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test

class AssistantRepositoryTests: AbstractOnServerIT() {
class AssistantRepositoryTests : AbstractOnServerIT() {

private var sut: AssistantRepository? = null

Expand Down Expand Up @@ -65,6 +65,4 @@ class AssistantRepositoryTests: AbstractOnServerIT() {
}
*/


}
179 changes: 81 additions & 98 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
<?xml version="1.0" encoding="utf-8"?><!--
Nextcloud Android client application
Copyright (C) 2012 Bartek Przybylski
Copyright (C) 2012-2016 ownCloud Inc.
Copyright (C) 2016 Nextcloud
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />

<!-- Used for document scanning, but lib declares it as required, which it's not -->
<uses-permission android:name="android.permission.WRITE_CALENDAR" /> <!-- Used for document scanning, but lib declares it as required, which it's not -->
<uses-feature
android:name="android.hardware.camera2"
android:required="false"
tools:node="replace" />

<!-- WRITE_EXTERNAL_STORAGE may be enabled or disabled by the user after installation in
API >= 23; the app needs to handle this -->
<!--
WRITE_EXTERNAL_STORAGE may be enabled or disabled by the user after installation in
API >= 23; the app needs to handle this
-->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"
Expand All @@ -45,9 +26,7 @@
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />

<!-- Next permissions are always approved in installation time, the apps needs to do nothing special in runtime -->
<uses-permission android:name="android.permission.VIBRATE" /> <!-- Next permissions are always approved in installation time, the apps needs to do nothing special in runtime -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
Expand All @@ -62,35 +41,72 @@
<uses-permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
android:maxSdkVersion="25" />

<!-- Apps that target Android 9 (API level 28) or higher and use foreground services
must request the FOREGROUND_SERVICE permission -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<!-- Runtime permissions introduced in Android 13 (API level 33) -->
<!--
Apps that target Android 9 (API level 28) or higher and use foreground services
must request the FOREGROUND_SERVICE permission
-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- Runtime permissions introduced in Android 13 (API level 33) -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<!-- Needed for Android 14 (API level 34) -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> <!-- Needed for Android 14 (API level 34) -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

<!-- Some Chromebooks don't support touch. Although not essential,
it's a good idea to explicitly include this declaration. -->
<!--
Some Chromebooks don't support touch. Although not essential,
it's a good idea to explicitly include this declaration.
-->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />

<uses-feature
android:name="android.hardware.camera"
android:required="false" />

<queries>
<package android:name="it.niedermann.nextcloud.deck" />
<package android:name="it.niedermann.nextcloud.deck.play" />
<package android:name="it.niedermann.nextcloud.deck.dev" />
<package android:name="at.bitfire.davdroid" />

<intent>
<action android:name="android.intent.action.VIEW" />

<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />

<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.SEND_MULTIPLE" />

<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.PICK" />

<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE_SECURE" />
</intent>
<intent>
<action android:name="android.media.action.VIDEO_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
</queries>

<application
android:name=".MainApp"
android:allowBackup="false"
android:fullBackupContent="@xml/backup_config"
android:dataExtractionRules="@xml/backup_rules"
android:fullBackupContent="@xml/backup_config"
android:icon="@mipmap/ic_launcher"
android:installLocation="internalOnly"
android:label="@string/app_name"
Expand All @@ -101,8 +117,11 @@
android:supportsRtl="true"
android:theme="@style/Theme.ownCloud.Toolbar"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup"
tools:ignore="UnusedAttribute">
tools:ignore="UnusedAttribute"
tools:replace="android:allowBackup">
<activity
android:name="com.nextcloud.ui.composeActivity.ComposeActivity"
android:exported="false" />

<uses-library
android:name="org.apache.http.legacy"
Expand Down Expand Up @@ -203,8 +222,8 @@
<activity
android:name=".ui.activity.SetupEncryptionActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@style/Theme.NoBackground"
android:exported="false" />
android:exported="false"
android:theme="@style/Theme.NoBackground" />
<activity
android:name=".ui.activity.ContactsPreferenceActivity"
android:exported="false"
Expand All @@ -217,12 +236,16 @@
android:theme="@style/Theme.ownCloud.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.SEND" />

<category android:name="android.intent.category.DEFAULT" />

<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />

<category android:name="android.intent.category.DEFAULT" />

<data android:mimeType="*/*" />
</intent-filter>
</activity>
Expand All @@ -236,9 +259,10 @@
android:theme="@style/Theme.ownCloud.Overlay" />
<activity
android:name=".ui.preview.PreviewMediaActivity"
android:exported="false"
android:configChanges="orientation|screenLayout|screenSize|keyboardHidden"
android:exported="false"
android:theme="@style/Theme.ownCloud.Media" />

<service
android:name=".authentication.AccountAuthenticatorService"
android:exported="false">
Expand All @@ -264,8 +288,8 @@
</service>
<service
android:name="com.nextcloud.client.widget.DashboardWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"
android:exported="true" />
android:exported="true"
android:permission="android.permission.BIND_REMOTEVIEWS" />

<provider
android:name=".providers.FileContentProvider"
Expand Down Expand Up @@ -303,14 +327,12 @@
android:readPermission="false"
android:writePermission="false" />
</provider>

<provider
android:name=".providers.UsersAndGroupsSearchProvider"
android:authorities="@string/users_and_groups_search_authority"
android:enabled="true"
android:exported="false"
android:label="@string/share_search" />

<provider
android:name=".providers.DocumentsStorageProvider"
android:authorities="@string/document_provider_authority"
Expand All @@ -321,9 +343,7 @@
<intent-filter>
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</provider>

<!-- new provider used to generate URIs without file:// scheme (forbidden from Android 7) -->
</provider> <!-- new provider used to generate URIs without file:// scheme (forbidden from Android 7) -->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="@string/file_provider_authority"
Expand All @@ -338,8 +358,7 @@
android:authorities="@string/image_cache_provider_authority"
android:exported="true"
android:grantUriPermissions="true"
android:permission="android.permission.MANAGE_DOCUMENTS" />
<!-- Disable WorkManager initialization. Whoever designed this, should pay closer attention -->
android:permission="android.permission.MANAGE_DOCUMENTS" /> <!-- Disable WorkManager initialization. Whoever designed this, should pay closer attention -->
<!-- to "best before" dates in his fridge. -->
<!-- disable default provider -->
<provider
Expand Down Expand Up @@ -395,12 +414,12 @@
android:exported="false" />
<service
android:name="com.nextcloud.client.jobs.transfer.FileTransferService"
android:foregroundServiceType="dataSync"
android:exported="false" />
android:exported="false"
android:foregroundServiceType="dataSync" />
<service
android:name="com.nextcloud.client.media.PlayerService"
android:foregroundServiceType="mediaPlayback"
android:exported="false" />
android:exported="false"
android:foregroundServiceType="mediaPlayback" />

<activity
android:name=".ui.activity.PassCodeActivity"
Expand Down Expand Up @@ -478,6 +497,7 @@
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>

<meta-data
android:name="android.app.searchable"
android:resource="@xml/users_and_groups_searchable" />
Expand Down Expand Up @@ -514,7 +534,6 @@
android:name="com.nextcloud.client.editimage.EditImageActivity"
android:exported="false"
android:theme="@style/Theme.ownCloud.Toolbar.NullBackground" />

<activity
android:name="com.nmc.android.ui.LauncherActivity"
android:exported="true"
Expand All @@ -525,42 +544,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

<queries>
<package android:name="it.niedermann.nextcloud.deck" />
<package android:name="it.niedermann.nextcloud.deck.play" />
<package android:name="it.niedermann.nextcloud.deck.dev" />
<package android:name="at.bitfire.davdroid"/>

<intent>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.intent.action.PICK" />
<data android:mimeType="*/*" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE_SECURE" />
</intent>
<intent>
<action android:name="android.media.action.VIDEO_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
</queries>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AssistantViewModel(client: NextcloudClient) : ViewModel() {

fun createTask(
input: String,
type: String,
type: String
) {
viewModelScope.launch(Dispatchers.IO) {
val result = repository.createTask(input, type)
Expand Down Expand Up @@ -126,6 +126,12 @@ class AssistantViewModel(client: NextcloudClient) : ViewModel() {
}
}

fun resetTaskDeletionState() {
_isTaskDeleted.update {
null
}
}

private fun filterTaskList(taskTypeId: String?) {
if (taskTypeId == null) {
_filteredTaskList.update {
Expand Down
Loading

0 comments on commit a3da70e

Please sign in to comment.