66import android .os .PowerManager ;
77import android .text .TextUtils ;
88import android .view .Menu ;
9+ import android .view .MenuItem ;
910import android .view .View ;
1011import android .view .ViewGroup ;
1112import android .widget .TextView ;
@@ -82,7 +83,6 @@ public void doHook() throws Exception {
8283 var animationEmojis = prefs .getBoolean ("animation_emojis" , false );
8384 var disableProfileStatus = prefs .getBoolean ("disable_profile_status" , false );
8485 var disableExpiration = prefs .getBoolean ("disable_expiration" , false );
85- var isAction = prefs .getBoolean ("buttonaction" , true );
8686
8787 propsInteger .put (3877 , oldStatus ? igstatus ? 2 : 0 : 2 );
8888
@@ -105,18 +105,19 @@ public void doHook() throws Exception {
105105 propsInteger .put (18564 , newSettings ? 2 : 0 );
106106
107107 if (newSettings ) {
108- if (!isAction ) {
109- Method hideMeIcon = Unobfuscator .loadHideMeTabIcon (classLoader );
110- XposedBridge .hookMethod (hideMeIcon , XC_MethodReplacement .returnConstant (null ));
111- propsBoolean .put (25516 , false );
112- propsBoolean .put (23920 , false );
113- propsBoolean .put (14862 , true );
114- propsInteger .put (18564 , 2 );
115- }
116- }else {
117- propsBoolean .put (14862 , newSettings ); // WHATS_HAPPENING_SENDING_ENABLED_CODE
118- propsInteger .put (18564 , newSettings ? 2 : 0 ); // ME_TAB_V2_VARIANTS_CODE
108+ XposedBridge .hookAllMethods (WppCore .getHomeActivityClass (classLoader ), "onCreateOptionsMenu" , new XC_MethodHook () {
109+ @ Override
110+ protected void afterHookedMethod (MethodHookParam param ) throws Throwable {
111+ var menu = (Menu )param .args [0 ];
112+ var menuItem = menu .findItem (Utils .getID ("me_tab_menu_item" ,"id" ));
113+ if (menuItem != null ){
114+ menuItem .setShowAsAction (MenuItem .SHOW_AS_ACTION_ALWAYS );
115+ }
116+ }
117+ });
119118 }
119+ propsBoolean .put (14862 , newSettings ); // WHATS_HAPPENING_SENDING_ENABLED_CODE
120+ propsInteger .put (18564 , newSettings ? 2 : 0 ); // ME_TAB_V2_VARIANTS_CODE
120121
121122 propsBoolean .put (2889 , floatingMenu );
122123
0 commit comments