Skip to content

Commit

Permalink
use tag
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jan 21, 2025
1 parent acfdc95 commit 74665ae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
import com.owncloud.android.lib.resources.status.E2EVersion;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.lib.resources.systemTag.SystemTag;
import com.owncloud.android.lib.resources.tags.Tag;
import com.owncloud.android.operations.RemoteOperationFailedException;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.MimeType;
Expand Down Expand Up @@ -1271,7 +1271,7 @@ private OCFile createFileInstance(FileEntity fileEntity) {
ocFile.setTags(new ArrayList<>());
} else {
try {
SystemTag[] tagsArray = gson.fromJson(tags, SystemTag[].class);
Tag[] tagsArray = gson.fromJson(tags, Tag[].class);
ocFile.setTags(new ArrayList<>(Arrays.asList(tagsArray)));
} catch (JsonSyntaxException e) {
// ignore saved value due to api change
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/owncloud/android/datamodel/OCFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.owncloud.android.lib.resources.files.model.ImageDimension;
import com.owncloud.android.lib.resources.files.model.ServerFileInterface;
import com.owncloud.android.lib.resources.shares.ShareeUser;
import com.owncloud.android.lib.resources.systemTag.SystemTag;
import com.owncloud.android.lib.resources.tags.Tag;
import com.owncloud.android.utils.MimeType;

import java.io.File;
Expand Down Expand Up @@ -118,7 +118,7 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
private long e2eCounter = -1;
@Nullable
private GeoLocation geolocation;
private List<SystemTag> tags = new ArrayList<>();
private List<Tag> tags = new ArrayList<>();
private Long internalFolderSyncTimestamp = -1L;
private String internalFolderSyncResult = "";

Expand Down Expand Up @@ -1048,11 +1048,11 @@ public GeoLocation getGeoLocation() {
return geolocation;
}

public List<SystemTag> getTags() {
public List<Tag> getTags() {
return tags;
}

public void setTags(List<SystemTag> tags) {
public void setTags(List<Tag> tags) {
this.tags = tags;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.shares.ShareeUser;
import com.owncloud.android.lib.resources.systemTag.SystemTag;
import com.owncloud.android.lib.resources.tags.Tag;
import com.owncloud.android.operations.RefreshFolderOperation;
import com.owncloud.android.operations.RemoteOperationFailedException;
import com.owncloud.android.ui.activity.ComponentsGetter;
Expand Down Expand Up @@ -651,7 +651,7 @@ private void bindListItemViewHolder(ListItemViewHolder holder, OCFile file) {
configureThumbnail(holder, file);
}

private void applyChipVisuals(Chip chip, SystemTag tag) {
private void applyChipVisuals(Chip chip, Tag tag) {
viewThemeUtils.material.themeChipSuggestion(chip);
chip.setText(tag.getName());

Expand All @@ -665,7 +665,7 @@ private void applyChipVisuals(Chip chip, SystemTag tag) {
chip.setChipStrokeColor(ColorStateList.valueOf(color));
chip.setTextColor(color);
} catch (IllegalArgumentException e) {
// do nothing
Log_OC.d(TAG, "Exception applyChipVisuals: " + e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import com.owncloud.android.lib.resources.files.ToggleFavoriteRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.systemTag.SystemTag;
import com.owncloud.android.lib.resources.tags.Tag;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.ToolbarActivity;
import com.owncloud.android.ui.adapter.FileDetailTabAdapter;
Expand Down Expand Up @@ -238,7 +238,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
if (getFile().getTags().isEmpty()) {
binding.tagsGroup.setVisibility(View.GONE);
} else {
for (SystemTag tag : getFile().getTags()) {
for (Tag tag : getFile().getTags()) {
Chip chip = new Chip(context);
chip.setText(tag.getName());
chip.setChipBackgroundColor(ColorStateList.valueOf(getResources().getColor(R.color.bg_default,
Expand Down

0 comments on commit 74665ae

Please sign in to comment.