Skip to content

Commit

Permalink
Merge pull request #81 from crimera/dev
Browse files Browse the repository at this point in the history
chore: Merge branch `dev` to `main`
  • Loading branch information
crimera authored Aug 15, 2024
2 parents cdb74b8 + a509273 commit 4e2a3bd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.26.0-dev.1](https://github.com/crimera/revanced-integrations/compare/v1.25.1...v1.26.0-dev.1) (2024-08-15)


### Features

* Quick settings button is now optional ([bf89107](https://github.com/crimera/revanced-integrations/commit/bf89107981979a032298622cc9e80fc51b21110b))

## [1.25.1](https://github.com/crimera/revanced-integrations/compare/v1.25.0...v1.25.1) (2024-08-12)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.util.AttributeSet;
import android.view.View;
import androidx.appcompat.widget.AppCompatButton;
import app.revanced.integrations.twitter.settings.ActivityHook;
import app.revanced.integrations.twitter.Utils;

public class PikoSettingsButton extends AppCompatButton implements View.OnClickListener {
Expand All @@ -28,14 +27,19 @@ public PikoSettingsButton(Context context, AttributeSet attrs, int defStyleAttr)
// Initialization method
private void init() {
setOnClickListener(this);
if (!Utils.getBooleanPerf(Settings.MISC_QUICK_SETTINGS_BUTTON)) {
setVisibility(GONE);
}
}

// Override the onClick method
@Override
public void onClick(View v) {
try{
try {
ActivityHook.startSettingsActivity();
}catch (Exception e){Utils.logger(e);}
} catch (Exception e) {
Utils.logger(e);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class Settings extends BaseSettings {
public static final StringSetting MISC_FEATURE_FLAGS_SEARCH = new StringSetting("misc_feature_flags_search", "");
public static final BooleanSetting MISC_ROUND_OFF_NUMBERS = new BooleanSetting("misc_round_off_numbers", true);
public static final BooleanSetting MISC_DEBUG_MENU = new BooleanSetting("misc_debug_menu", false);
public static final BooleanSetting MISC_QUICK_SETTINGS_BUTTON = new BooleanSetting("misc_quick_settings_button", false);

public static final BooleanSetting ADS_HIDE_PROMOTED_TRENDS = new BooleanSetting("ads_hide_promoted_trends", true);
public static final BooleanSetting ADS_HIDE_PROMOTED_POSTS = new BooleanSetting("ads_hide_promoted_posts", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {

}

//Misc Section
//misc Section
if (SettingsStatus.enableMiscSection()) {
LegacyTwitterPreferenceCategory miscPrefs = preferenceCategory(strRes("piko_title_misc"), screen);
if (SettingsStatus.enableFontMod) {
Expand Down Expand Up @@ -351,6 +351,14 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
);
}

miscPrefs.addPreference(
switchPreference(
strRes("piko_pref_quick_settings"),
strRes("piko_pref_quick_settings_summary"),
Settings.MISC_QUICK_SETTINGS_BUTTON
)
);

if (SettingsStatus.featureFlagsEnabled) {
miscPrefs.addPreference(
buttonPreference(
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
android.useAndroidX = true
version = 1.25.1
version = 1.26.0-dev.1

0 comments on commit 4e2a3bd

Please sign in to comment.