Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
Tobias Kaminsky 2024-10-02 02:31:50 +02:00
commit 4985bb0592
24 changed files with 232 additions and 159 deletions

View file

@ -273,7 +273,7 @@ dependencies {
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.ui:ui-tooling-preview:1.6.8")
implementation("androidx.compose.ui:ui-tooling-preview:1.7.2")
debugImplementation 'androidx.compose.ui:ui-tooling:1.6.8'
compileOnly 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
@ -285,7 +285,7 @@ dependencies {
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation 'androidx.webkit:webkit:1.11.0'
implementation 'androidx.webkit:webkit:1.12.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -15,7 +15,7 @@ enum class DeepLinkConstants(val route: String, val navId: Int) {
OPEN_MEDIA("openMedia", R.id.nav_gallery),
OPEN_SHARED("openShared", R.id.nav_shared),
OPEN_OFFLINE("openOffline", R.id.nav_on_device),
OPEN_NOTIFICATIONS("openNotifications", R.id.nav_notifications),
OPEN_NOTIFICATIONS("openNotifications", -1),
OPEN_DELETED("openDeleted", R.id.nav_trashbin),
OPEN_SETTINGS("openSettings", R.id.nav_settings),

View file

@ -36,7 +36,6 @@ fun DrawerActivity.getMenuItemIdFromTitle(): Int? {
getString(R.string.drawer_item_groupfolders) -> R.id.nav_groupfolders
getString(R.string.drawer_item_on_device) -> R.id.nav_on_device
getString(R.string.drawer_item_recently_modified) -> R.id.nav_recently_modified
getString(R.string.drawer_item_notifications) -> R.id.nav_notifications
getString(R.string.drawer_item_assistant) -> R.id.nav_assistant
getString(R.string.drawer_item_uploads_list) -> R.id.nav_uploads
getString(R.string.drawer_item_trashbin) -> R.id.nav_trashbin

View file

@ -14,7 +14,7 @@ import java.net.URI
*/
object AuthenticatorUrlUtils {
const val WEBDAV_PATH_4_0_AND_LATER = "/remote.php/webdav"
private const val REMOTE_PHP_PATH = "/remote.php/dav"
fun normalizeUrlSuffix(url: String): String {
var normalizedUrl = url
@ -29,7 +29,7 @@ object AuthenticatorUrlUtils {
while (trimmedUrl.endsWith("/")) {
trimmedUrl = trimmedUrl.substring(0, url.length - 1)
}
val pos = trimmedUrl.lastIndexOf(WEBDAV_PATH_4_0_AND_LATER)
val pos = trimmedUrl.lastIndexOf(REMOTE_PHP_PATH)
if (pos >= 0) {
trimmedUrl = trimmedUrl.substring(0, pos)
}
@ -37,8 +37,8 @@ object AuthenticatorUrlUtils {
}
private fun trimUrlWebdav(url: String): String {
return if (url.lowercase().endsWith(WEBDAV_PATH_4_0_AND_LATER)) {
url.substring(0, url.length - WEBDAV_PATH_4_0_AND_LATER.length)
return if (url.lowercase().endsWith(REMOTE_PHP_PATH)) {
url.substring(0, url.length - REMOTE_PHP_PATH.length)
} else {
url
}

View file

@ -46,7 +46,7 @@ public class GetServerInfoOperation extends RemoteOperation {
* TODO ugly dependency, get rid of it.
*/
public GetServerInfoOperation(String url, Context context) {
mUrl = trimWebdavSuffix(url);
mUrl = AuthenticatorUrlUtils.INSTANCE.trimWebdavSuffix(url);
mContext = context;
mResultData = new ServerInfo();
}
@ -95,24 +95,6 @@ public class GetServerInfoOperation extends RemoteOperation {
return operation.execute(client);
}
private String trimWebdavSuffix(String url) {
String trimmedUrl = url;
if (trimmedUrl == null) {
trimmedUrl = "";
} else {
if (trimmedUrl.endsWith("/")) {
trimmedUrl = trimmedUrl.substring(0, trimmedUrl.length() - 1);
}
if (trimmedUrl.toLowerCase(Locale.ROOT).endsWith(AuthenticatorUrlUtils.WEBDAV_PATH_4_0_AND_LATER)) {
trimmedUrl = trimmedUrl.substring(0,
trimmedUrl.length() - AuthenticatorUrlUtils.WEBDAV_PATH_4_0_AND_LATER.length());
}
}
return trimmedUrl;
}
private String normalizeProtocolPrefix(String url, boolean isSslConn) {
if (!url.toLowerCase(Locale.ROOT).startsWith("http://") &&
!url.toLowerCase(Locale.ROOT).startsWith("https://")) {

View file

@ -539,8 +539,6 @@ public abstract class DrawerActivity extends ToolbarActivity
startActivity(TrashbinActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
} else if (itemId == R.id.nav_activity) {
startActivity(ActivitiesActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP);
} else if (itemId == R.id.nav_notifications) {
startActivity(NotificationsActivity.class);
} else if (itemId == R.id.nav_settings) {
startActivity(SettingsActivity.class);
} else if (itemId == R.id.nav_community) {
@ -583,7 +581,7 @@ public abstract class DrawerActivity extends ToolbarActivity
startActivity(composeActivity);
}
private void startActivity(Class<? extends Activity> activity) {
void startActivity(Class<? extends Activity> activity) {
startActivity(new Intent(getApplicationContext(), activity));
}
@ -1306,6 +1304,9 @@ public abstract class DrawerActivity extends ToolbarActivity
case ACTION_APP_UPDATE:
openAppStore(getPackageName(), false);
break;
case OPEN_NOTIFICATIONS:
startActivity(NotificationsActivity.class);
break;
default:
handleNavItemClickEvent(deepLinkType.getNavId());
break;

View file

@ -83,6 +83,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCo
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.RestoreFileVersionRemoteOperation;
import com.owncloud.android.lib.resources.files.SearchRemoteOperation;
import com.owncloud.android.lib.resources.notifications.GetNotificationsRemoteOperation;
import com.owncloud.android.lib.resources.notifications.models.Notification;
import com.owncloud.android.operations.CopyFileOperation;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.DownloadType;
@ -308,6 +310,7 @@ public class FileDisplayActivity extends FileActivity
setupHomeSearchToolbarWithSortAndListButtons();
mMenuButton.setOnClickListener(v -> openDrawer());
mSwitchAccountButton.setOnClickListener(v -> showManageAccountsDialog());
mNotificationButton.setOnClickListener(v -> startActivity(NotificationsActivity.class));
fastScrollUtils.fixAppBarForFastScroll(binding.appbar.appbar, binding.rootLayout);
}
@ -395,6 +398,7 @@ public class FileDisplayActivity extends FileActivity
upgradeNotificationForInstantUpload();
checkOutdatedServer();
checkNotifications();
}
private Activity getActivity() {
@ -425,6 +429,24 @@ public class FileDisplayActivity extends FileActivity
DisplayUtils.showServerOutdatedSnackbar(this, Snackbar.LENGTH_LONG);
}
}
private void checkNotifications() {
new Thread(() -> {
try {
RemoteOperationResult<List<Notification>> result = new GetNotificationsRemoteOperation()
.execute(clientFactory.createNextcloudClient(accountManager.getUser()));
if (result.isSuccess() && !result.getResultData().isEmpty()) {
runOnUiThread(() -> mNotificationButton.setVisibility(View.VISIBLE));
} else {
runOnUiThread(() -> mNotificationButton.setVisibility(View.GONE));
}
} catch (ClientFactory.CreationException e) {
Log_OC.e(TAG, "Could not fetch notifications!");
}
}).start();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
@ -1153,6 +1175,8 @@ public class FileDisplayActivity extends FileActivity
}
//show in-app review dialog to user
inAppReviewHelper.showInAppReview(this);
checkNotifications();
Log_OC.v(TAG, "onResume() end");
}

View file

@ -1,6 +1,7 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper.ozturk@nextcloud.com>
* SPDX-FileCopyrightText: 2020 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-FileCopyrightText: 2017 Mario Danic <mario@lovelyhq.com>
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH
@ -8,17 +9,24 @@
*/
package com.owncloud.android.ui.activity
import android.os.Build
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.view.WindowInsetsController
import androidx.annotation.VisibleForTesting
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.snackbar.Snackbar
import com.nextcloud.client.account.User
import com.nextcloud.client.account.UserAccountManager
import com.nextcloud.client.di.Injectable
import com.nextcloud.client.jobs.NotificationWork
import com.nextcloud.client.network.ClientFactory
import com.nextcloud.client.network.ClientFactory.CreationException
import com.nextcloud.client.preferences.AppPreferences
import com.nextcloud.common.NextcloudClient
import com.owncloud.android.R
import com.owncloud.android.databinding.NotificationsLayoutBinding
@ -33,12 +41,15 @@ import com.owncloud.android.ui.asynctasks.DeleteAllNotificationsTask
import com.owncloud.android.ui.notifications.NotificationsContract
import com.owncloud.android.utils.DisplayUtils
import com.owncloud.android.utils.PushUtils
import com.owncloud.android.utils.theme.ViewThemeUtils
import java.util.Optional
import javax.inject.Inject
/**
* Activity displaying all server side stored notification items.
*/
class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
@Suppress("TooManyFunctions")
class NotificationsActivity : AppCompatActivity(), NotificationsContract.View, Injectable {
lateinit var binding: NotificationsLayoutBinding
@ -47,6 +58,18 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
private var client: NextcloudClient? = null
private var optionalUser: Optional<User>? = null
@Inject
lateinit var viewThemeUtils: ViewThemeUtils
@Inject
lateinit var accountManager: UserAccountManager
@Inject
lateinit var clientFactory: ClientFactory
@Inject
lateinit var preferences: AppPreferences
override fun onCreate(savedInstanceState: Bundle?) {
Log_OC.v(TAG, "onCreate() start")
@ -54,26 +77,56 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
binding = NotificationsLayoutBinding.inflate(layoutInflater)
setContentView(binding.root)
setupActionBar()
setupStatusBar()
initUser()
setupContainingList()
setupPushWarning()
setupContent()
optionalUser = user
if (optionalUser?.isPresent == false) {
showError()
}
}
private fun initUser() {
optionalUser = Optional.of(accountManager.user)
intent?.let {
it.extras?.let { bundle ->
setupUser(bundle)
}
}
}
setupToolbar()
updateActionBarTitleAndHomeButtonByString(getString(R.string.drawer_item_notifications))
setupDrawer()
if (optionalUser?.isPresent == false) {
showError()
private fun setupActionBar() {
setSupportActionBar(findViewById(R.id.toolbar_back_button))
supportActionBar?.apply {
setTitle(R.string.drawer_item_notifications)
setDisplayHomeAsUpEnabled(true)
setHomeAsUpIndicator(R.drawable.ic_arrow_back_foreground)
}
}
setupContainingList()
setupPushWarning()
setupContent()
private fun setupStatusBar() {
window.statusBarColor = ContextCompat.getColor(this, R.color.bg_default)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val appearanceLightStatusBars = if (preferences.isDarkModeEnabled) {
0
} else {
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
}
window.insetsController?.setSystemBarsAppearance(
appearanceLightStatusBars,
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
)
} else {
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = if (preferences.isDarkModeEnabled) {
0
} else {
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
}
}
}
private fun setupContainingList() {
@ -97,8 +150,6 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
val user = optionalUser?.get()
if (user?.accountName.equals(accountName, ignoreCase = true)) {
accountManager.setCurrentOwnCloudAccount(accountName)
setUser(userAccountManager.user)
optionalUser = getUser()
}
}
}
@ -167,18 +218,6 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
}
}
override fun openDrawer() {
super.openDrawer()
if (snackbar != null && snackbar?.isShown == true) {
snackbar?.dismiss()
}
}
override fun closeDrawer() {
super.closeDrawer()
setupPushWarning()
}
/**
* sets up the UI elements and loads all notification items.
*/
@ -265,16 +304,16 @@ class NotificationsActivity : DrawerActivity(), NotificationsContract.View {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
var retval = true
val itemId = item.itemId
if (itemId == android.R.id.home) {
if (isDrawerOpen) {
closeDrawer()
} else {
openDrawer()
when (itemId) {
android.R.id.home -> {
onBackPressedDispatcher.onBackPressed()
}
R.id.action_empty_notifications -> {
DeleteAllNotificationsTask(client, this).execute()
}
else -> {
retval = super.onOptionsItemSelected(item)
}
} else if (itemId == R.id.action_empty_notifications) {
DeleteAllNotificationsTask(client, this).execute()
} else {
retval = super.onOptionsItemSelected(item)
}
return retval
}

View file

@ -52,6 +52,7 @@ public abstract class ToolbarActivity extends BaseActivity implements Injectable
protected MaterialButton mMenuButton;
protected MaterialTextView mSearchText;
protected MaterialButton mSwitchAccountButton;
protected MaterialButton mNotificationButton;
private AppBarLayout mAppBar;
private RelativeLayout mDefaultToolbar;
@ -82,6 +83,7 @@ public abstract class ToolbarActivity extends BaseActivity implements Injectable
mMenuButton = findViewById(R.id.menu_button);
mSearchText = findViewById(R.id.search_text);
mSwitchAccountButton = findViewById(R.id.switch_account_button);
mNotificationButton = findViewById(R.id.notification_button);
if (showSortListButtonGroup) {
findViewById(R.id.sort_list_button_group).setVisibility(View.VISIBLE);

View file

@ -0,0 +1,13 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2018-2024 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="@color/foreground_highlight" android:pathData="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
</vector>

View file

@ -1,16 +0,0 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2018-2024 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#757575"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M160,760L160,680L240,680L240,400Q240,317 290,252.5Q340,188 420,168L420,140Q420,115 437.5,97.5Q455,80 480,80Q505,80 522.5,97.5Q540,115 540,140L540,168Q620,188 670,252.5Q720,317 720,400L720,680L800,680L800,760L160,760ZM480,880Q447,880 423.5,856.5Q400,833 400,800L560,800Q560,833 536.5,856.5Q513,880 480,880Z" />
</vector>

View file

@ -6,93 +6,79 @@
~ SPDX-FileCopyrightText: 2017 Mario Danic <mario@lovelyhq.com>
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:fitsSystemWindows="true"
android:focusable="true">
android:layout_height="match_parent">
<androidx.coordinatorlayout.widget.CoordinatorLayout
<include layout="@layout/toolbar_back_button" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginTop="@dimen/action_bar_margin_top"
android:layout_below="@id/appbar"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/toolbar_standard" />
<FrameLayout
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_containing_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/appbar"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:footerDividersEnabled="false"
android:visibility="visible">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_containing_list"
<androidx.recyclerview.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:footerDividersEnabled="false"
android:visibility="visible">
android:layout_marginLeft="-3dp"
android:layout_marginRight="-3dp"
android:layout_marginBottom="-3dp"
android:background="@color/bg_default"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
android:visibility="visible"
tools:listitem="@layout/notification_list_item" />
<androidx.recyclerview.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="-3dp"
android:layout_marginRight="-3dp"
android:layout_marginBottom="-3dp"
android:background="@color/bg_default"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
android:visibility="visible"
tools:listitem="@layout/notification_list_item" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_containing_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:footerDividersEnabled="false"
android:visibility="visible">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_containing_empty"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:footerDividersEnabled="false"
android:visibility="visible">
android:layout_height="match_parent">
<FrameLayout
<LinearLayout
android:id="@+id/loading_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<LinearLayout
android:id="@+id/loading_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
<include layout="@layout/activity_list_item_shimmer" />
</LinearLayout>
</LinearLayout>
<include
android:id="@+id/empty_list"
layout="@layout/empty_list" />
<include
android:id="@+id/empty_list"
layout="@layout/empty_list" />
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<include
layout="@layout/drawer"
android:layout_width="@dimen/drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start" />
</androidx.drawerlayout.widget.DrawerLayout>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2024 Alper Ozturk <alper.ozturk@nextcloud.com>
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<androidx.appcompat.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar_back_button"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/Theme.AppCompat.DayNight.NoActionBar" />

View file

@ -197,10 +197,24 @@
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/menu_button"
app:layout_constraintRight_toLeftOf="@id/switch_account_button"
app:layout_constraintRight_toLeftOf="@id/notification_button"
app:layout_constraintTop_toTopOf="parent"
tools:text="Search in Nextcloud" />
<com.google.android.material.button.MaterialButton
android:id="@+id/notification_button"
style="@style/Widget.AppTheme.Button.IconButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/notification_icon_description"
app:cornerRadius="@dimen/button_corner_radius"
app:iconSize="20dp"
app:icon="@drawable/ic_notification"
app:iconTint="@color/fontAppbar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/switch_account_button"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/switch_account_button"
style="@style/Widget.AppTheme.Button.IconButton"

View file

@ -64,12 +64,6 @@
android:orderInCategory="0"
android:title="@string/drawer_item_recently_modified"
android:visible="true"/>
<item
android:orderInCategory="0"
android:id="@+id/nav_notifications"
android:icon="@drawable/nav_notifications"
android:title="@string/drawer_item_notifications"/>
<item
android:id="@+id/nav_assistant"
android:icon="@drawable/ic_assistant"

View file

@ -34,6 +34,7 @@
<string name="add_to_cloud">Додати до хмари %1$s</string>
<string name="advanced_settings">Розширені</string>
<string name="allow_resharing">Дозволяти передавати у спільний доступ іншим</string>
<string name="app_config_base_url_title">Основний URL</string>
<string name="app_config_proxy_host_title">Хост проксі-сервера</string>
<string name="app_config_proxy_port_title">Порт проксі-сервера</string>
<string name="app_widget_description">Показувати один віджет з панелі віджетів</string>
@ -182,6 +183,7 @@
<string name="conflict_folder_headline">Конфлікт з каталогом</string>
<string name="conflict_local_file">Файл на пристрої</string>
<string name="conflict_message_description">Якщо ви виберете обидві версії, то до назви локального файлу буде додано порядковий номер.</string>
<string name="conflict_message_description_for_folder">Якщо ви виберете обидві версії, до назви каталогу на пристрої буде додано цифру.</string>
<string name="conflict_server_file">Файл у хмарі</string>
<string name="contact_backup_title">Резервне копіювання контактів</string>
<string name="contact_no_permission">Потрібний доступ до контактів.</string>
@ -406,8 +408,14 @@
<string name="file_migration_updating_index">Оновлення індексу...</string>
<string name="file_migration_use_data_folder">Використовувати</string>
<string name="file_migration_waiting_for_unfinished_sync">Очікування повної синхронізації…</string>
<string name="file_name_validator_current_path_is_invalid">Недійсне ім\'я поточного каталогу, будь ласка, перейменуйте цей каталог. Переспрямування на домівку.</string>
<string name="file_name_validator_error_contains_reserved_names_or_invalid_characters">Шлях до каталогу містить зарезервовані імена або недійсні символи</string>
<string name="file_name_validator_error_forbidden_file_extensions">%s є недозволеним розширенням файлу</string>
<string name="file_name_validator_error_forbidden_space_character_extensions">Імена файлів не мають містити пробіли на початку та наприкінці</string>
<string name="file_name_validator_error_invalid_character">Ім\'я містить недійсний символ: %s</string>
<string name="file_name_validator_error_reserved_names">%s не є дозволеним ім\'ям</string>
<string name="file_name_validator_rename_before_move_or_copy">%s. Перейменуйте файл перед переміщенням або копіюванням</string>
<string name="file_name_validator_upload_content_error">Неможливо завантажити частину вмісту, оскільки він містить зарезервовані імена або недійсні символи</string>
<string name="file_not_found">Файл не знайдено</string>
<string name="file_not_synced">Неможливо синхронізувати файл. Буде показано останню доступну версію.</string>
<string name="file_rename">Перейменувати</string>
@ -560,6 +568,7 @@
<string name="note_could_not_sent">Неможливо надіслати нотатку</string>
<string name="note_icon_hint">Піктограма нотатки</string>
<string name="notification_action_failed">Не вдалося виконати дію.</string>
<string name="notification_channel_background_operations_description">Показувати сповіщення про результати фонових операцій</string>
<string name="notification_channel_background_operations_name">Фонові операції</string>
<string name="notification_channel_download_description">Показує перебіг звантаження</string>
<string name="notification_channel_download_name_short">Звантаження</string>

View file

@ -14,6 +14,7 @@
<dimen name="nav_drawer_header_height">164dp</dimen>
<dimen name="nav_drawer_menu_avatar_radius">12sp</dimen>
<dimen name="list_item_avatar_icon_radius">20dp</dimen>
<dimen name="action_bar_margin_top">64dp</dimen>
<dimen name="bottom_sheet_text_start_margin">40dp</dimen>
<dimen name="bottom_sheet_item_height">56dp</dimen>
<dimen name="bottom_sheet_menu_item_divider_standard_margin">80dp</dimen>

View file

@ -1242,4 +1242,5 @@
<string name="file_name_validator_error_forbidden_space_character_extensions">Filenames must not contain spaces at the beginning or end</string>
<string name="sync">Sync</string>
<string name="please_select_a_server">Please select a server…</string>
<string name="notification_icon_description">Unread notifications exist</string>
</resources>

View file

@ -256,12 +256,15 @@
<trusting group="androidx.activity"/>
<trusting group="androidx.annotation"/>
<trusting group="androidx.appcompat"/>
<trusting group="androidx.collection"/>
<trusting group="androidx.core"/>
<trusting group="androidx.databinding"/>
<trusting group="androidx.fragment"/>
<trusting group="androidx.graphics"/>
<trusting group="androidx.lifecycle"/>
<trusting group="androidx.transition" name="transition" version="1.5.0"/>
<trusting group="androidx.webkit" name="webkit" version="1.11.0"/>
<trusting group="androidx.webkit" name="webkit" version="1.12.0"/>
<trusting group="androidx.work"/>
<trusting group="^androidx[.]compose($|([.].*))" regex="true"/>
<trusting group="^androidx[.]test($|([.].*))" regex="true"/>
@ -817,6 +820,11 @@
<sha256 value="721e76e74ee4158d3fe9759074b7eceed4ff7d84ed34a3faca5843fb874ac946" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.collection" name="collection-ktx" version="1.2.0">
<artifact name="collection-ktx-1.2.0.module">
<sha256 value="f65f46474d6e6ef108d66479b5f0471c0a4b349339d36bd39b41041125413277" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.compose" name="compose-bom" version="2024.02.01">
<artifact name="compose-bom-2024.02.01.pom">
<sha256 value="a1fd8a9bd0a80c9f203065d01b76616d6675a3874c6b8bd1e87736dbfb318005" origin="Generated by Gradle" reason="Artifact is not signed"/>

View file

@ -32,12 +32,12 @@ echo "Branch: $BRANCH"
if [ "$BRANCH" = $stableBranch ]; then
echo "New spotbugs result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html"
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.html --upload-file app/build/reports/spotbugs/spotbugs.html
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.xml" --upload-file app/build/reports/spotbugs/gplayDebug.xml
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/$stableBranch.html --upload-file app/build/reports/spotbugs/spotbugs.html
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/$stableBranch.xml" --upload-file app/build/reports/spotbugs/gplayDebug.xml
if [ $lintValue -ne 1 ]; then
echo "New lint result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-lint/$stableBranch.html"
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/$stableBranch.html --upload-file app/build/reports/lint/lint.html
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-lint/$stableBranch.html --upload-file app/build/reports/lint/lint.html
exit 0
fi
else
@ -45,10 +45,10 @@ else
6=$stableBranch"-"$(date +%F)
fi
echo "New lint results at https://www.kaminsky.me/nc-dev/$repository-lint/${BUILD_NUMBER}.html"
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/${BUILD_NUMBER}.html" --upload-file app/build/reports/lint/lint.html
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-lint/${BUILD_NUMBER}.html" --upload-file app/build/reports/lint/lint.html
echo "New spotbugs results at https://www.kaminsky.me/nc-dev/$repository-findbugs/${BUILD_NUMBER}.html"
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/${BUILD_NUMBER}.html" --upload-file app/build/reports/spotbugs/spotbugs.html
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/${BUILD_NUMBER}.html" --upload-file app/build/reports/spotbugs/spotbugs.html
# delete all old comments, starting with Codacy
oldComments=$(curl_gh -X GET "https://api.github.com/repos/nextcloud/$repository/issues/${PR_NUMBER}/comments" | jq '.[] | select((.user.login | contains("github-actions")) and (.body | test("<h1>Codacy.*"))) | .id')

View file

@ -11,12 +11,14 @@
#3: DRONE_BUILD_NUMBER
#4: DRONE_PULL_REQUEST
DAV_URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-artifacts/
PUBLIC_URL=https://www.kaminsky.me/nc-dev/android-artifacts
USER=$1
PASS=$2
BUILD=$3
PR=$4
GITHUB_TOKEN=$5
DAV_URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-artifacts/
source scripts/lib.sh

View file

@ -27,7 +27,6 @@ upload() {
#5: TYPE (IT or Unit)
#6: DRONE_PULL_REQUEST
URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-integrationTests
ID=$3
USER=$1
PASS=$2
@ -39,6 +38,7 @@ source scripts/lib.sh
REMOTE_FOLDER=$ID-$TYPE-$BRANCH-$(date +%H-%M)
BRANCH_TYPE=$BRANCH-$TYPE
URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-integrationTests
set -e