mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-22 12:56:02 +03:00
Merge pull request #1771 from nextcloud/bumpCommons
Streamline commons version
This commit is contained in:
commit
a7f921b1bf
3 changed files with 9 additions and 9 deletions
|
@ -77,11 +77,11 @@ dependencies {
|
|||
|
||||
// Nextcloud SSO
|
||||
implementation 'com.github.nextcloud.android-common:ui:0.8.0'
|
||||
implementation 'com.github.nextcloud:Android-SingleSignOn:0.6.1'
|
||||
implementation 'com.github.nextcloud:Android-SingleSignOn:0.7.0'
|
||||
implementation 'com.github.stefan-niedermann:android-commons:0.2.9'
|
||||
implementation 'com.github.stefan-niedermann.nextcloud-commons:sso-glide:1.6.4'
|
||||
implementation 'com.github.stefan-niedermann.nextcloud-commons:exception:1.6.4'
|
||||
implementation('com.github.stefan-niedermann.nextcloud-commons:markdown:1.6.4') {
|
||||
implementation "com.github.stefan-niedermann.nextcloud-commons:sso-glide:$commonsVersion"
|
||||
implementation "com.github.stefan-niedermann.nextcloud-commons:exception:$commonsVersion"
|
||||
implementation("com.github.stefan-niedermann.nextcloud-commons:markdown:$commonsVersion") {
|
||||
exclude group: 'org.jetbrains', module: 'annotations-java5'
|
||||
}
|
||||
|
||||
|
|
|
@ -12,13 +12,12 @@ import androidx.annotation.NonNull;
|
|||
import androidx.core.util.Consumer;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.nextcloud.android.sso.Constants;
|
||||
import com.nextcloud.android.sso.helper.VersionCheckHelper;
|
||||
import com.nextcloud.android.sso.model.FilesAppType;
|
||||
|
||||
import it.niedermann.owncloud.notes.FormattingHelpActivity;
|
||||
import it.niedermann.owncloud.notes.R;
|
||||
import it.niedermann.owncloud.notes.about.AboutActivity;
|
||||
import it.niedermann.owncloud.notes.branding.BrandingUtil;
|
||||
import it.niedermann.owncloud.notes.databinding.ItemNavigationBinding;
|
||||
import it.niedermann.owncloud.notes.persistence.entity.Account;
|
||||
import it.niedermann.owncloud.notes.preferences.PreferencesActivity;
|
||||
|
@ -79,9 +78,9 @@ public class MenuAdapter extends RecyclerView.Adapter<MenuViewHolder> {
|
|||
// https://github.com/nextcloud/android/pull/8405#issuecomment-852966877
|
||||
final int minVersionCode = 30170090;
|
||||
try {
|
||||
if (VersionCheckHelper.getNextcloudFilesVersionCode(context, true) > minVersionCode) {
|
||||
if (VersionCheckHelper.getNextcloudFilesVersionCode(context, FilesAppType.PROD) > minVersionCode) {
|
||||
return generateTrashbinAppIntent(context, account, true);
|
||||
} else if (VersionCheckHelper.getNextcloudFilesVersionCode(context, false) > minVersionCode) {
|
||||
} else if (VersionCheckHelper.getNextcloudFilesVersionCode(context, FilesAppType.DEV) > minVersionCode) {
|
||||
return generateTrashbinAppIntent(context, account, false);
|
||||
} else {
|
||||
// Files app is too old to be able to switch the account when launching the TrashbinActivity
|
||||
|
@ -95,7 +94,7 @@ public class MenuAdapter extends RecyclerView.Adapter<MenuViewHolder> {
|
|||
|
||||
private static Intent generateTrashbinAppIntent(@NonNull Context context, @NonNull Account account, boolean prod) throws PackageManager.NameNotFoundException {
|
||||
final var packageManager = context.getPackageManager();
|
||||
final String packageName = prod ? Constants.PACKAGE_NAME_PROD : Constants.PACKAGE_NAME_DEV;
|
||||
final String packageName = prod ? FilesAppType.PROD.packageId : FilesAppType.DEV.packageId;
|
||||
final var intent = new Intent();
|
||||
intent.setClassName(packageName, "com.owncloud.android.ui.trashbin.TrashbinActivity");
|
||||
if (packageManager.resolveActivity(intent, 0) != null) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
buildscript {
|
||||
ext {
|
||||
kotlinVersion = '1.8.20'
|
||||
commonsVersion = '1.7.0'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
Loading…
Reference in a new issue