Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Table of Contents

* [Changelog for unreleased](#changelog-for-owncloud-android-client-unreleased-unreleased)
* [Changelog for 4.8.2](#changelog-for-owncloud-android-client-482-2026-07-01)
* [Changelog for 4.8.1](#changelog-for-owncloud-android-client-481-2026-06-09)
* [Changelog for 4.8.0](#changelog-for-owncloud-android-client-480-2026-05-18)
* [Changelog for 4.7.0](#changelog-for-owncloud-android-client-470-2025-11-17)
Expand Down Expand Up @@ -33,12 +33,12 @@
* [Changelog for 2.18.1](#changelog-for-owncloud-android-client-2181-2021-07-20)
* [Changelog for 2.18.0](#changelog-for-owncloud-android-client-2180-2021-05-24)
* [Changelog for 2.17 versions and below](#changelog-for-217-versions-and-below)
# Changelog for ownCloud Android Client [unreleased] (UNRELEASED)
# Changelog for ownCloud Android Client [4.8.2] (2026-07-01)

The following sections list the changes in ownCloud Android Client unreleased relevant to
The following sections list the changes in ownCloud Android Client 4.8.2 relevant to
ownCloud admins and users.

[unreleased]: https://github.com/owncloud/android/compare/v4.8.1...master
[4.8.2]: https://github.com/owncloud/android/compare/v4.8.1...v4.8.2

## Summary

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ android {

testInstrumentationRunner "com.owncloud.android.utils.OCTestAndroidJUnitRunner"

versionCode = 48000100
versionName = "4.8.1"
versionCode = 48000200
versionName = "4.8.2"

buildConfigField "String", gitRemote, "\"" + getGitOriginRemote() + "\""
buildConfigField "String", commitSHA1, "\"" + getLatestGitHash() + "\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import androidx.core.content.FileProvider
import androidx.core.text.HtmlCompat
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.core.view.updateMargins
import androidx.fragment.app.FragmentActivity
Expand Down Expand Up @@ -96,19 +97,22 @@ fun Activity.showMessageInSnackbar(
message: CharSequence,
duration: Int = Snackbar.LENGTH_LONG
) {
Snackbar.make(findViewById(layoutId), message, duration).show()
val bottomNavView = findViewById<View?>(R.id.bottom_nav_view)
val snackbar = Snackbar.make(findViewById(layoutId), message, duration)
if (bottomNavView?.isVisible == true) { snackbar.setAnchorView(bottomNavView) }
snackbar.show()
}

fun Activity.showSnackbarWithAction(
message: CharSequence,
actionText: CharSequence,
action: () -> Unit,
duration: Int = Snackbar.LENGTH_LONG,
layoutId: Int = android.R.id.content
) {
Snackbar.make(findViewById(layoutId), message, duration)
.setAction(actionText) { action() }
.show()
val bottomNavView = findViewById<View?>(R.id.bottom_nav_view)
val snackbar = Snackbar.make(findViewById(android.R.id.content), message, duration)
if (bottomNavView?.isVisible == true) { snackbar.setAnchorView(bottomNavView) }
snackbar.setAction(actionText) { action() }.show()
}

fun Activity.showErrorInToast(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*
* @author David González Verdugo
* @author Juan Carlos Garrote Gascón
* @author Jorge Aguado Recio
*
* Copyright (C) 2023 ownCloud GmbH.
* Copyright (C) 2026 ownCloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand All @@ -26,7 +27,9 @@ import android.content.Context
import android.content.DialogInterface
import android.view.Menu
import android.view.MenuItem.SHOW_AS_ACTION_NEVER
import android.view.View
import android.view.inputmethod.InputMethodManager
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
Expand All @@ -45,10 +48,14 @@ fun Fragment.showErrorInSnackbar(genericErrorMessageId: Int, throwable: Throwabl

fun Fragment.showMessageInSnackbar(
message: CharSequence,
duration: Int = Snackbar.LENGTH_LONG
duration: Int = Snackbar.LENGTH_LONG,
) {
val requiredView = view ?: return
Snackbar.make(requiredView, message, duration).show()
val rootView = view?.rootView ?: return
val bottomNavView = rootView.findViewById<View?>(R.id.bottom_nav_view)
val snackbar = Snackbar.make(requiredView, message, duration)
if (bottomNavView?.isVisible == true) { snackbar.setAnchorView(bottomNavView) }
snackbar.show()
}

fun Fragment.showSnackbarWithAction(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* ownCloud Android client application
* <p>
* Copyright (C) 2022 ownCloud GmbH.
* Copyright (C) 2026 ownCloud GmbH.
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -35,6 +35,7 @@
import androidx.fragment.app.FragmentTransaction;
import com.google.android.material.snackbar.Snackbar;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.presentation.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.domain.files.model.OCFile;
Expand Down Expand Up @@ -319,12 +320,17 @@ public void dismissLoadingDialog() {
*/
public void showSnackMessage(String message) {
final View rootView = findViewById(android.R.id.content);
final View bottomNavView = findViewById(R.id.bottom_nav_view);

if (rootView == null) {
// If root view is not available don't let the app brake. show the notification anyway.
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
return;
}
Snackbar.make(rootView, message, Snackbar.LENGTH_LONG).show();
Snackbar snackbar = Snackbar.make(rootView, message, Snackbar.LENGTH_LONG);
if (bottomNavView != null && bottomNavView.getVisibility() == View.VISIBLE) {
snackbar.setAnchorView(bottomNavView);
}
snackbar.show();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author Jorge Aguado Recio
* <p>
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2025 ownCloud GmbH.
* Copyright (C) 2026 ownCloud GmbH.
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -289,8 +289,7 @@ protected void showRequestAccountChangeNotice(String errorMessage, boolean mustC
requestCredentialsUpdate();
return Unit.INSTANCE;
},
Snackbar.LENGTH_INDEFINITE,
android.R.id.content
Snackbar.LENGTH_INDEFINITE
);
}
}
Expand All @@ -304,8 +303,7 @@ protected void showRequestRegainAccess() {
requestCredentialsUpdate();
return Unit.INSTANCE;
},
Snackbar.LENGTH_INDEFINITE,
android.R.id.content
Snackbar.LENGTH_INDEFINITE
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.work.WorkManager
import com.google.android.material.snackbar.Snackbar
import com.owncloud.android.AppRater
import com.owncloud.android.BuildConfig
import com.owncloud.android.MainApp
Expand Down Expand Up @@ -1178,7 +1179,6 @@ class FileDisplayActivity : FileActivity(),
}
updateBottombar(targetFolderSpace)
},
layoutId = R.id.list_layout
)
} else {
showMessageInSnackbar(R.id.list_layout, message)
Expand Down Expand Up @@ -1410,7 +1410,7 @@ class FileDisplayActivity : FileActivity(),

is SynchronizeFileUseCase.SyncType.DownloadEnqueued -> {
fileWaitingToPreview?.let {
showSnackMessage(getString(R.string.new_remote_version_found_msg))
Snackbar.make(findViewById(android.R.id.content), R.string.new_remote_version_found_msg, Snackbar.LENGTH_LONG).show()
startSyncThenOpen(it)
fileWaitingToPreview = null
} ?: showSnackMessage(getString(R.string.download_enqueued_msg))
Expand Down