Skip to content

Commit

Permalink
Remove the head lock settings
Browse files Browse the repository at this point in the history
We added it as a temporary way to freely move windows while window
movement was not implemented. Now that we have it in place there is no
need to keep it in the settings. It has never been really useful.
  • Loading branch information
svillar committed Nov 28, 2024
1 parent 26b5857 commit 4f149a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ protected void updateUI() {
mBinding.latinAutoCompleteSwitch.setOnCheckedChangeListener(mLatinAutoCompleteListener);
setLatinAutoComplete(SettingsStore.getInstance(getContext()).isLatinAutoCompleteEnabled(), false);

mBinding.headLockSwitch.setOnCheckedChangeListener(mHeadLockListener);
setHeadLock(SettingsStore.getInstance(getContext()).isHeadLockEnabled(), false);

mDefaultHomepageUrl = getContext().getString(R.string.HOMEPAGE_URL);

mBinding.homepageEdit.setHint1(getContext().getString(R.string.homepage_hint, getContext().getString(R.string.app_name)));
Expand Down Expand Up @@ -188,10 +185,6 @@ public boolean isEditing() {
setLatinAutoComplete(enabled, true);
};

private SwitchSetting.OnCheckedChangeListener mHeadLockListener = (compoundButton, value, doApply) -> {
setHeadLock(value, true);
};

private OnClickListener mHomepageListener = (view) -> {
if (!mBinding.homepageEdit.getFirstText().isEmpty()) {
setHomepage(mBinding.homepageEdit.getFirstText());
Expand Down Expand Up @@ -265,7 +258,6 @@ public boolean isEditing() {
setHomepage(mDefaultHomepageUrl);
setAutoplay(SettingsStore.AUTOPLAY_ENABLED, true);
setCurvedDisplay(false, true);
setHeadLock(SettingsStore.HEAD_LOCK_DEFAULT, true);
setSoundEffect(SettingsStore.AUDIO_ENABLED, true);
setLatinAutoComplete(SettingsStore.LATIN_AUTO_COMPLETE_ENABLED, true);
setCenterWindows(SettingsStore.CENTER_WINDOWS_DEFAULT, true);
Expand Down Expand Up @@ -334,17 +326,6 @@ private void setLatinAutoComplete(boolean value, boolean doApply) {
}
}

private void setHeadLock(boolean value, boolean doApply) {
mBinding.headLockSwitch.setOnCheckedChangeListener(null);
mBinding.headLockSwitch.setValue(value, false);
mBinding.headLockSwitch.setOnCheckedChangeListener(mHeadLockListener);

SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (doApply) {
settingsStore.setHeadLockEnabled(value);
}
}

private void setSoundEffect(boolean value, boolean doApply) {
mBinding.soundEffectSwitch.setOnCheckedChangeListener(null);
mBinding.soundEffectSwitch.setValue(value, false);
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/layout/options_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@
android:layout_height="wrap_content"
app:description="@string/developer_options_center_windows" />

<com.igalia.wolvic.ui.views.settings.SwitchSetting
android:id="@+id/headLockSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/display_options_head_lock" />

</LinearLayout>
</com.igalia.wolvic.ui.views.CustomScrollView>

Expand Down

0 comments on commit 4f149a4

Please sign in to comment.