mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968170 - Remove unused DELETED state from PanelConfig (r=margaret)
This commit is contained in:
parent
111df1d823
commit
8588506603
@ -106,8 +106,7 @@ public final class HomeConfig {
|
||||
|
||||
public enum Flags {
|
||||
DEFAULT_PANEL,
|
||||
DISABLED_PANEL,
|
||||
DELETED_PANEL
|
||||
DISABLED_PANEL
|
||||
}
|
||||
|
||||
public PanelConfig(JSONObject json) throws JSONException, IllegalArgumentException {
|
||||
@ -286,18 +285,6 @@ public final class HomeConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDeleted() {
|
||||
return mFlags.contains(Flags.DELETED_PANEL);
|
||||
}
|
||||
|
||||
public void setIsDeleted(boolean isDeleted) {
|
||||
if (isDeleted) {
|
||||
mFlags.add(Flags.DELETED_PANEL);
|
||||
} else {
|
||||
mFlags.remove(Flags.DELETED_PANEL);
|
||||
}
|
||||
}
|
||||
|
||||
public JSONObject toJSON() throws JSONException {
|
||||
final JSONObject json = new JSONObject();
|
||||
|
||||
@ -596,12 +583,6 @@ public final class HomeConfig {
|
||||
}
|
||||
|
||||
public void save(List<PanelConfig> panelConfigs) {
|
||||
for (PanelConfig panelConfig : panelConfigs) {
|
||||
if (panelConfig.isDeleted()) {
|
||||
throw new IllegalArgumentException("Should never save a deleted PanelConfig: " + panelConfig.getId());
|
||||
}
|
||||
}
|
||||
|
||||
mBackend.save(panelConfigs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user