diff --git a/app/src/main/java/rocks/tbog/tblauncher/entry/TagEntry.java b/app/src/main/java/rocks/tbog/tblauncher/entry/TagEntry.java index e38a4eabc..e6364af91 100644 --- a/app/src/main/java/rocks/tbog/tblauncher/entry/TagEntry.java +++ b/app/src/main/java/rocks/tbog/tblauncher/entry/TagEntry.java @@ -22,9 +22,10 @@ public TagEntry(@NonNull String id) { super(id, 0); if (BuildConfig.DEBUG) { if (!id.startsWith(SCHEME)) - throw new IllegalStateException("Invalid " + TagEntry.class.getSimpleName() + " id `" + id + "`"); - if (!(this instanceof TagSortEntry) && TagSortEntry.isTagSort(id)) - throw new IllegalStateException(TagEntry.class.getSimpleName() + " instantiated with id `" + id + "`"); + throw new IllegalStateException("Invalid " + getClass().getSimpleName() + " id `" + id + "`"); + if ((!(this instanceof TagSortEntry) && TagSortEntry.isTagSort(id)) + || ((this instanceof TagSortEntry) && !TagSortEntry.isTagSort(id))) + throw new IllegalStateException(getClass().getSimpleName() + " instantiated with id `" + id + "`"); } } diff --git a/app/src/main/java/rocks/tbog/tblauncher/handler/TagsHandler.java b/app/src/main/java/rocks/tbog/tblauncher/handler/TagsHandler.java index 2f839c697..0e3dd7a69 100644 --- a/app/src/main/java/rocks/tbog/tblauncher/handler/TagsHandler.java +++ b/app/src/main/java/rocks/tbog/tblauncher/handler/TagsHandler.java @@ -521,9 +521,7 @@ public boolean changeTagSort(String tagId, String newTagId) { TagsProvider tagsProvider = dataHandler.getTagsProvider(); if (tagsProvider != null) { tagEntry = tagsProvider.findById(tagId); - if (tagEntry != null && tagEntry.hasCustomIcon()) { - newEntry = tagsProvider.getTagEntry(newTagId); - } + newEntry = tagsProvider.findById(newTagId); } if (tagEntry == null) tagEntry = TagsProvider.newTagEntryCheckId(tagId);