mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Adds additional folder label states (UNLABELED & EMPTY_LABEL)
UNLABELED -> title==null and EMPTY_LABEL -> title=="". When adding new items for the folder if the folder is in UNLABELED state, auto-labeling will be enabled. This change also addresses auto-labeling issue due to false edit from UNLABELED to EMPTY. Bug: 159164315 Change-Id: Ia17cd27b4afb60420dc15c544f544061fc46ad33
This commit is contained in:
@@ -26,7 +26,6 @@ import static com.android.launcher3.config.FeatureFlags.ALWAYS_USE_HARDWARE_OPTI
|
||||
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_LABEL_UPDATED;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ITEM_DROP_COMPLETED;
|
||||
import static com.android.launcher3.model.data.FolderInfo.FLAG_MANUAL_FOLDER_NAME;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
@@ -339,11 +338,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onBackKey newTitle=" + newTitle);
|
||||
}
|
||||
mInfo.setTitle(newTitle);
|
||||
mInfo.setOption(FLAG_MANUAL_FOLDER_NAME, !mInfo.getAcceptedSuggestionIndex().isPresent(),
|
||||
mLauncher.getModelWriter());
|
||||
mInfo.setTitle(newTitle, mLauncher.getModelWriter());
|
||||
mFolderIcon.onTitleChanged(newTitle);
|
||||
mLauncher.getModelWriter().updateItemInDatabase(mInfo);
|
||||
|
||||
if (TextUtils.isEmpty(mInfo.title)) {
|
||||
mFolderName.setHint(R.string.folder_hint_text);
|
||||
|
||||
Reference in New Issue
Block a user