Skip to content

Commit c469352

Browse files
Merge pull request #2982 from nextcloud/renovate/nextcloudandroidcommonlib
fix(deps): update nextcloudandroidcommonlib to v0.31.0
2 parents f9d3d8e + adea22b commit c469352

19 files changed

+400
-76
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ dependencies {
114114
exclude group: 'commons-logging', module: 'commons-logging'
115115
}
116116

117-
implementation("com.github.nextcloud:android-library:2.22.2") {
117+
implementation("com.github.nextcloud:android-library:4596e80dec") {
118118
exclude group: 'org.ogce', module: 'xpp3'
119119
}
120120

app/src/main/java/it/niedermann/owncloud/notes/main/items/NoteViewHolder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
import androidx.annotation.ColorInt;
2121
import androidx.annotation.NonNull;
2222
import androidx.annotation.Nullable;
23-
import androidx.appcompat.widget.AppCompatImageView;
2423
import androidx.recyclerview.selection.ItemDetailsLookup;
2524
import androidx.recyclerview.widget.RecyclerView;
2625

2726
import com.google.android.material.chip.Chip;
27+
import com.google.android.material.progressindicator.CircularProgressIndicator;
2828
import com.nextcloud.android.common.core.utils.DateFormatter;
2929
import com.nextcloud.android.common.ui.theme.utils.ColorRole;
3030

@@ -66,12 +66,12 @@ protected void bindModified(@NonNull TextView noteModified, @Nullable Calendar m
6666
}
6767
}
6868

69-
protected void bindStatus(AppCompatImageView noteStatus, DBStatus status, int color) {
70-
noteStatus.setVisibility(DBStatus.VOID.equals(status) ? INVISIBLE : VISIBLE);
69+
protected void bindStatus(CircularProgressIndicator noteSyncStatus, DBStatus status, int color) {
70+
noteSyncStatus.setVisibility(DBStatus.VOID.equals(status) ? INVISIBLE : VISIBLE);
7171

72-
final var context = noteStatus.getContext();
72+
final var context = noteSyncStatus.getContext();
7373
final var util = BrandingUtil.of(color, context);
74-
util.platform.tintDrawable(context, noteStatus.getDrawable(), ColorRole.ON_PRIMARY_CONTAINER);
74+
util.material.colorProgressBar(noteSyncStatus, ColorRole.PRIMARY);
7575
}
7676

7777
protected void bindCategory(@NonNull Context context, @NonNull TextView noteCategory, boolean showCategory, @NonNull String category, int color) {

app/src/main/java/it/niedermann/owncloud/notes/main/items/grid/NoteViewGridHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void bind(boolean isSelected, @NonNull Note note, boolean showCategory, @
5050
super.bind(isSelected, note, showCategory, color, searchQuery);
5151
@NonNull final Context context = itemView.getContext();
5252
bindCategory(context, binding.noteCategory, showCategory, note.getCategory(), color);
53-
bindStatus(binding.noteStatus, note.getStatus(), color);
53+
bindStatus(binding.noteSyncStatus, note.getStatus(), color);
5454
bindFavorite(binding.noteFavorite, note.getFavorite());
5555
bindModified(binding.noteModified, note.getModified());
5656
bindSearchableContent(context, binding.noteTitle, searchQuery, note.getTitle(), color);

app/src/main/java/it/niedermann/owncloud/notes/main/items/grid/NoteViewGridHolderOnlyTitle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void bind(boolean isSelected, @NonNull Note note, boolean showCategory, i
4242
super.bind(isSelected, note, showCategory, color, searchQuery);
4343
@NonNull final Context context = itemView.getContext();
4444
bindCategory(context, binding.noteCategory, showCategory, note.getCategory(), color);
45-
bindStatus(binding.noteStatus, note.getStatus(), color);
45+
bindStatus(binding.noteSyncStatus, note.getStatus(), color);
4646
bindFavorite(binding.noteFavorite, note.getFavorite());
4747
bindModified(binding.noteModified, note.getModified());
4848
bindSearchableContent(context, binding.noteTitle, searchQuery, note.getTitle(), color);

app/src/main/java/it/niedermann/owncloud/notes/main/items/list/NoteViewListHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void bind(boolean isSelected, @NonNull Note note, boolean showCategory, @
5757
@NonNull final var context = itemView.getContext();
5858
binding.noteCard.setAlpha(DBStatus.LOCAL_DELETED.equals(note.getStatus()) ? 0.5f : 1.0f);
5959
bindCategory(context, binding.noteCategory, showCategory, note.getCategory(), color);
60-
bindStatus(binding.noteStatus, note.getStatus(), color);
60+
bindStatus(binding.noteSyncStatus, note.getStatus(), color);
6161
bindFavorite(binding.noteFavorite, note.getFavorite());
6262
bindModified(binding.noteModified, note.getModified());
6363

app/src/main/java/it/niedermann/owncloud/notes/manageaccounts/ManageAccountsActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import androidx.lifecycle.ViewModelProvider;
2121

2222
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
23+
import com.nextcloud.android.common.ui.theme.utils.ColorRole;
2324
import com.nextcloud.android.sso.AccountImporter;
2425
import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException;
2526

@@ -149,7 +150,7 @@ private void changeAccountSetting(@NonNull Account localAccount, @StringRes int
149150
mainColor$.removeObservers(this);
150151
final var util = BrandingUtil.of(color, this);
151152
util.material.colorTextInputLayout(binding.inputWrapper);
152-
util.material.colorProgressBar(binding.progress);
153+
util.material.colorProgressBar(binding.progress, ColorRole.PRIMARY);
153154
});
154155

155156
binding.inputWrapper.setHint(title);

app/src/main/java/it/niedermann/owncloud/notes/share/NoteShareActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ private void initializeArguments() {
164164
repository.getSharesForNotesAndSaveShareEntities();
165165

166166
runOnUiThread(() -> {
167-
binding.title.setText(R.string.activity_sharing_title);
168167
binding.fileName.setText(note.getTitle());
169168
binding.searchContainer.setVisibility(View.VISIBLE);
170169
binding.sharesList.setVisibility(View.VISIBLE);

app/src/main/java/it/niedermann/owncloud/notes/share/NoteShareDetailActivity.kt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import android.os.Bundle
1212
import android.text.TextUtils
1313
import android.view.View
1414
import androidx.lifecycle.lifecycleScope
15+
import com.nextcloud.android.common.ui.theme.utils.ColorRole
1516
import com.nextcloud.android.sso.helper.SingleAccountHelper
1617
import com.owncloud.android.lib.common.utils.Log_OC
1718
import com.owncloud.android.lib.resources.shares.OCShare
@@ -46,7 +47,8 @@ import java.util.Date
4647
* 2. This will handle both Advanced Permissions and Send New Email functionality for existing shares to modify them.
4748
*/
4849
@Suppress("TooManyFunctions")
49-
class NoteShareDetailActivity : BrandedActivity(),
50+
class NoteShareDetailActivity :
51+
BrandedActivity(),
5052
ExpirationDatePickerDialogFragment.OnExpiryDateListener {
5153

5254
companion object {
@@ -86,6 +88,8 @@ class NoteShareDetailActivity : BrandedActivity(),
8688

8789
binding = ActivityNoteShareDetailBinding.inflate(layoutInflater)
8890
setContentView(binding.root)
91+
setSupportActionBar(binding.toolbar)
92+
binding.toolbar.setNavigationOnClickListener({ v -> backPressed() })
8993
val arguments = intent.extras
9094

9195
arguments?.let {
@@ -122,6 +126,9 @@ class NoteShareDetailActivity : BrandedActivity(),
122126
}
123127
}
124128

129+
private fun backPressed() {
130+
finish()
131+
}
125132

126133
override fun applyBrand(color: Int) {
127134
val util = BrandingUtil.of(color, this)
@@ -136,6 +143,8 @@ class NoteShareDetailActivity : BrandedActivity(),
136143
colorTextView(shareProcessAdvancePermissionTitle)
137144

138145
themeCheckbox(shareProcessAllowResharingCheckbox)
146+
147+
colorTextView(title, ColorRole.ON_SURFACE)
139148
}
140149

141150
util.androidx.run {
@@ -152,6 +161,8 @@ class NoteShareDetailActivity : BrandedActivity(),
152161

153162
colorMaterialButtonPrimaryFilled(shareProcessBtnNext)
154163
colorMaterialButtonPrimaryOutlined(shareProcessBtnCancel)
164+
165+
themeToolbar(toolbar)
155166
}
156167
}
157168
util.platform.colorViewBackground(window.decorView)
@@ -192,6 +203,9 @@ class NoteShareDetailActivity : BrandedActivity(),
192203
} else {
193204
binding.shareProcessSetExpDateSwitch.visibility = View.GONE
194205
}
206+
207+
binding.noteText.setText(share?.note)
208+
195209
shareProcessStep = SCREEN_TYPE_PERMISSION
196210
}
197211

@@ -448,12 +462,9 @@ class NoteShareDetailActivity : BrandedActivity(),
448462
}
449463
}
450464

451-
452-
private fun getReSharePermission(): Int {
453-
return SharePermissionsBuilder().apply {
454-
setSharePermission(true)
455-
}.build()
456-
}
465+
private fun getReSharePermission(): Int = SharePermissionsBuilder().apply {
466+
setSharePermission(true)
467+
}.build()
457468

458469
/**
459470
* method to validate the step 1 screen information
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<!--
22
~ Nextcloud - Android Client
33
~
4-
~ SPDX-FileCopyrightText: 2018-2024 Google LLC
4+
~ SPDX-FileCopyrightText: 2018-2025 Google LLC
55
~ SPDX-License-Identifier: Apache-2.0
66
-->
77
<vector xmlns:android="http://schemas.android.com/apk/res/android"
88
android:width="24dp"
99
android:height="24dp"
1010
android:tint="#757575"
11-
android:viewportWidth="24.0"
12-
android:viewportHeight="24.0">
11+
android:viewportWidth="960"
12+
android:viewportHeight="960">
1313
<path
14-
android:fillColor="#FF000000"
15-
android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z" />
14+
android:fillColor="@android:color/white"
15+
android:pathData="M320,560Q303,560 291.5,548.5Q280,537 280,520Q280,503 291.5,491.5Q303,480 320,480Q337,480 348.5,491.5Q360,503 360,520Q360,537 348.5,548.5Q337,560 320,560ZM480,560Q463,560 451.5,548.5Q440,537 440,520Q440,503 451.5,491.5Q463,480 480,480Q497,480 508.5,491.5Q520,503 520,520Q520,537 508.5,548.5Q497,560 480,560ZM640,560Q623,560 611.5,548.5Q600,537 600,520Q600,503 611.5,491.5Q623,480 640,480Q657,480 668.5,491.5Q680,503 680,520Q680,537 668.5,548.5Q657,560 640,560ZM200,880Q167,880 143.5,856.5Q120,833 120,800L120,240Q120,207 143.5,183.5Q167,160 200,160L240,160L240,80L320,80L320,160L640,160L640,80L720,80L720,160L760,160Q793,160 816.5,183.5Q840,207 840,240L840,800Q840,833 816.5,856.5Q793,880 760,880L200,880ZM200,800L760,800Q760,800 760,800Q760,800 760,800L760,400L200,400L200,800Q200,800 200,800Q200,800 200,800ZM200,320L760,320L760,240Q760,240 760,240Q760,240 760,240L200,240Q200,240 200,240Q200,240 200,240L200,320ZM200,320L200,240Q200,240 200,240Q200,240 200,240L200,240Q200,240 200,240Q200,240 200,240L200,320Z" />
1616
</vector>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
~ Nextcloud Notes - Android Client
3+
~
4+
~ SPDX-FileCopyrightText: 2018-2025 Google LLC
5+
~ SPDX-License-Identifier: Apache-2.0
6+
-->
7+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
8+
android:width="24dp"
9+
android:height="24dp"
10+
android:tint="?attr/colorControlNormal"
11+
android:viewportWidth="960"
12+
android:viewportHeight="960">
13+
<path
14+
android:fillColor="@android:color/white"
15+
android:pathData="M256,760L200,704L424,480L200,256L256,200L480,424L704,200L760,256L536,480L760,704L704,760L480,536L256,760Z" />
16+
</vector>

0 commit comments

Comments
 (0)