diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 07b8e4ea41..5b3a34c67e 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -19,21 +19,21 @@ jobs: run: | if [ -z "$GITHUB_HEAD_REF" ]; then # push - echo "::set-output name=branch::$GITHUB_REF_NAME" - echo "::set-output name=pr::$GITHUB_RUN_ID" - echo "::set-output name=repo::${{ github.repository }}" + echo "branch=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT" + echo "pr=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT" else # pull request - echo "::set-output name=branch::$GITHUB_HEAD_REF" - echo "::set-output name=pr::${{ github.event.pull_request.number }}" - echo "::set-output name=repo::${{ github.event.pull_request.head.repo.full_name }}" + echo "branch=$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT" + echo "pr=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" + echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT" fi - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: repository: ${{ steps.get-vars.outputs.repo }} ref: ${{ steps.get-vars.outputs.branch }} - name: Set up JDK 11 - uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0 with: distribution: "temurin" java-version: 11 diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showEmpty.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showEmpty.png new file mode 100644 index 0000000000..a4a82a352d Binary files /dev/null and b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showEmpty.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showGroupfolder.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showGroupfolder.png new file mode 100644 index 0000000000..12f3388100 Binary files /dev/null and b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.GroupfolderListFragmentIT_showGroupfolder.png differ diff --git a/app/src/androidTest/java/com/owncloud/android/ui/fragment/GroupfolderListFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/fragment/GroupfolderListFragmentIT.kt index 7af8093cec..752eff2a5d 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/fragment/GroupfolderListFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/fragment/GroupfolderListFragmentIT.kt @@ -42,13 +42,35 @@ class GroupfolderListFragmentIT : AbstractIT() { activity = testActivityRule.launchActivity(null) } + @Test + @ScreenshotTest + fun showGroupfolder() { + val sut = GroupfolderListFragment() + activity.addFragment(sut) + + shortSleep() // to let async task finish + + activity.runOnUiThread { + sut.setAdapter(null) + sut.setData( + mapOf( + Pair("2", Groupfolder(2, "/subfolder/group")) + ) + ) + } + + waitForIdleSync() + shortSleep() + screenshot(activity) + } + @Test @ScreenshotTest fun showGroupfolders() { val sut = GroupfolderListFragment() activity.addFragment(sut) - waitForIdleSync() + shortSleep() // to let async task finish activity.runOnUiThread { sut.setAdapter(null) diff --git a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt index b366c64351..64dbc259d8 100644 --- a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt +++ b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt @@ -35,6 +35,7 @@ import android.widget.Toast import androidx.annotation.IdRes import androidx.appcompat.content.res.AppCompatResources import androidx.core.os.bundleOf +import androidx.core.view.isEmpty import androidx.core.view.isVisible import androidx.fragment.app.FragmentManager import androidx.fragment.app.setFragmentResult @@ -199,9 +200,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { private fun displayActions( actions: List ) { - actions.forEach { action -> - val view = inflateActionView(action) - binding.fileActionsList.addView(view) + if (binding.fileActionsList.isEmpty()) { + actions.forEach { action -> + val view = inflateActionView(action) + binding.fileActionsList.addView(view) + } } } diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/GroupfolderListFragment.kt b/app/src/main/java/com/owncloud/android/ui/fragment/GroupfolderListFragment.kt index 7c05f6033b..6252a57414 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/GroupfolderListFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/fragment/GroupfolderListFragment.kt @@ -26,7 +26,7 @@ import android.content.Intent.ACTION_VIEW import android.os.Bundle import android.os.Handler import androidx.lifecycle.lifecycleScope -import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.LinearLayoutManager import com.nextcloud.android.lib.resources.groupfolders.Groupfolder import com.nextcloud.client.di.Injectable import com.nextcloud.client.logger.Logger @@ -35,6 +35,7 @@ import com.owncloud.android.R import com.owncloud.android.datamodel.OCFile import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation import com.owncloud.android.lib.resources.files.model.RemoteFile +import com.owncloud.android.ui.EmptyRecyclerView import com.owncloud.android.ui.activity.FileDisplayActivity import com.owncloud.android.ui.adapter.GroupfolderListAdapter import com.owncloud.android.ui.asynctasks.GroupfoldersSearchTask @@ -65,6 +66,7 @@ class GroupfolderListFragment : OCFileListFragment(), Injectable, GroupfolderLis searchFragment = true } + @Deprecated("Deprecated in Java") override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) @@ -79,8 +81,9 @@ class GroupfolderListFragment : OCFileListFragment(), Injectable, GroupfolderLis adapter = GroupfolderListAdapter(requireContext(), viewThemeUtils, this) setRecyclerViewAdapter(adapter) - val layoutManager = GridLayoutManager(context, 1) + val layoutManager = LinearLayoutManager(context) recyclerView.layoutManager = layoutManager + (recyclerView as EmptyRecyclerView).setHasFooter(false) } private fun search() { @@ -104,6 +107,12 @@ class GroupfolderListFragment : OCFileListFragment(), Injectable, GroupfolderLis } } + override fun onRefresh() { + super.onRefresh() + + search() + } + @SuppressLint("NotifyDataSetChanged") fun setData(result: Map) { adapter.setData(result) diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml index 711c34d6e8..3118a36db8 100644 --- a/app/src/main/res/values-cs-rCZ/strings.xml +++ b/app/src/main/res/values-cs-rCZ/strings.xml @@ -524,6 +524,7 @@ Bezpečnostní kód odstraněn Bezpečnostní kód uložen Nesprávný bezpečnostní kód + Nedaří se otevřít heslem chráněné PDF. Použijte externí prohlížeč PDF. Pokud chcete stránku zvětšit, klepněte na ni Povolit Odepřít diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 2d461cced8..8d108a07b6 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -524,6 +524,7 @@ PIN gelöscht PIN gespeichert PIN nicht korrekt + Passwortgeschützte PDF-Datei konnte nicht geöffnet werden. Bitte verwenden Sie einen externen PDF-Viewer. Auf eine Seite klicken um hereinzuzoomen Zulassen Ablehnen diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index da3dafddde..1ac674f3dc 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -524,6 +524,7 @@ Código de acceso borrado Código de acceso almacenado Código de acceso incorrecto + No es posible abrir archivos PDF protegidos por contraseñas. Por favor, usa un visor PDF externo. Toca sobre una página para hacer zoom Permitir Denegar diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index ace663be99..7dac8f6bc8 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -524,6 +524,7 @@ Кôд обрисан Код је сачуван Неисправан код + Не може да се отвори PDF заштићен лозинком. Молимо вас да употребите спољни PDF приказивач. Тапните на страницу да је зумирате Дозволи Одбиј diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index eeeec565db..76a8326f5b 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -524,6 +524,7 @@ Lösenord raderat Kod sparad Ogiltigt lösenord + Kan inte öppna lösenordsskyddad PDF. Använd en extern PDF-läsare. Tryck på sidan för zoomning Tillåt Neka diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 354d5a5cc2..f087067ff6 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -524,6 +524,7 @@ 通行碼已刪除 通行碼已儲存 通行碼錯誤 + 無法開啟密碼保護的 PDF。請使用外部 PDF 檢視程式。 點擊頁面以放大 允許