forked from distok/cutthecord
		
	New patch: nocamerabutton
This commit is contained in:
		
							parent
							
								
									2b5c73dbad
								
							
						
					
					
						commit
						37c67106c3
					
				
					 3 changed files with 178 additions and 0 deletions
				
			
		|  | @ -62,6 +62,7 @@ Video demonstration: https://www.youtube.com/watch?v=NMRPsAgqtWQ | ||||||
| - necessary: Does some necessary things that may be required to get the app running properly, not available for every version, but is automatically built into all branches. | - necessary: Does some necessary things that may be required to get the app running properly, not available for every version, but is automatically built into all branches. | ||||||
| - noblocked: Hides blocked messages and the "# blocked messages" thingy. Useful for those of us who just can't resist tapping those. | - noblocked: Hides blocked messages and the "# blocked messages" thingy. Useful for those of us who just can't resist tapping those. | ||||||
| - noemojibutton: Hides the emoji button. | - noemojibutton: Hides the emoji button. | ||||||
|  | - nocamerabutton: Hides the camera button next to album button, and prevents the expand behavior while kb is open. | ||||||
| - nonearby: Intentionally breaks "add nearby people" feature. | - nonearby: Intentionally breaks "add nearby people" feature. | ||||||
| - noprofilestrip: Hides your username and discriminator from the "profile strip" on the left bar. Useful to potentially avoid bans. | - noprofilestrip: Hides your username and discriminator from the "profile strip" on the left bar. Useful to potentially avoid bans. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										160
									
								
								patches/nocamerabutton/1078.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										160
									
								
								patches/nocamerabutton/1078.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,160 @@ | ||||||
|  | Only in com.discord-1078: build | ||||||
|  | Only in com.discord-1078: dist | ||||||
|  | diff -crB com.discord-1078-base/res/layout/flex_input_widget.xml com.discord-1078/res/layout/flex_input_widget.xml
 | ||||||
|  | *** com.discord-1078-base/res/layout/flex_input_widget.xml	2020-03-26 10:35:48.218868000 +0300 | ||||||
|  | --- com.discord-1078/res/layout/flex_input_widget.xml	2020-03-26 15:58:15.494674786 +0300
 | ||||||
|  | *************** | ||||||
|  | *** 8,14 **** | ||||||
|  |       <RelativeLayout android:paddingLeft="12.0dip" android:paddingTop="@dimen/uikit_spacing_medium" android:paddingRight="12.0dip" android:paddingBottom="@dimen/uikit_spacing_medium" style="@style/UiKit.ViewGroup"> | ||||||
|  |           <LinearLayout android:id="@id/flex_input_left_btns_container" android:layout_width="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" style="@style/UiKit.ViewGroup.LinearLayout.Horizontal"> | ||||||
|  |               <androidx.appcompat.widget.AppCompatImageButton android:layout_gravity="center_vertical" android:id="@id/flex_input_expand_btn" android:padding="@dimen/uikit_spacing_medium" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_carot_right_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/expand_buttons" style="@style/FlexInput.Input" /> | ||||||
|  | !             <androidx.appcompat.widget.AppCompatImageButton android:id="@id/flex_input_camera_btn" android:background="@drawable/drawable_circle_black" android:padding="@dimen/uikit_spacing_medium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_camera_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/camera" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/FlexInput.Input" />
 | ||||||
|  |               <androidx.appcompat.widget.AppCompatImageButton android:id="@id/flex_input_gallery_btn" android:background="@drawable/drawable_circle_black" android:padding="@dimen/uikit_spacing_medium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_gallery_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/attachment_photos" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/FlexInput.Input" /> | ||||||
|  |           </LinearLayout> | ||||||
|  |           <LinearLayout android:id="@id/flex_input_main_input_container" android:background="@drawable/drawable_bg_corners_20dp" android:paddingLeft="12.0dip" android:paddingRight="@dimen/uikit_spacing_small" android:layout_toLeftOf="@id/flex_input_send_btn_container" android:layout_toRightOf="@id/flex_input_left_btns_container" android:layout_centerVertical="true" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/UiKit.ViewGroup.LinearLayout.Horizontal"> | ||||||
|  | --- 8,14 ----
 | ||||||
|  |       <RelativeLayout android:paddingLeft="12.0dip" android:paddingTop="@dimen/uikit_spacing_medium" android:paddingRight="12.0dip" android:paddingBottom="@dimen/uikit_spacing_medium" style="@style/UiKit.ViewGroup"> | ||||||
|  |           <LinearLayout android:id="@id/flex_input_left_btns_container" android:layout_width="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" style="@style/UiKit.ViewGroup.LinearLayout.Horizontal"> | ||||||
|  |               <androidx.appcompat.widget.AppCompatImageButton android:layout_gravity="center_vertical" android:id="@id/flex_input_expand_btn" android:padding="@dimen/uikit_spacing_medium" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_carot_right_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/expand_buttons" style="@style/FlexInput.Input" /> | ||||||
|  | !             <androidx.appcompat.widget.AppCompatImageButton android:id="@id/flex_input_camera_btn" android:visibility="gone" android:background="@drawable/drawable_circle_black" android:padding="@dimen/uikit_spacing_medium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_camera_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/camera" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/FlexInput.Input" />
 | ||||||
|  |               <androidx.appcompat.widget.AppCompatImageButton android:id="@id/flex_input_gallery_btn" android:background="@drawable/drawable_circle_black" android:padding="@dimen/uikit_spacing_medium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/uikit_spacing_medium" android:src="@drawable/ic_gallery_24dp" android:tint="?colorInteractiveNormal" android:contentDescription="@string/attachment_photos" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/FlexInput.Input" /> | ||||||
|  |           </LinearLayout> | ||||||
|  |           <LinearLayout android:id="@id/flex_input_main_input_container" android:background="@drawable/drawable_bg_corners_20dp" android:paddingLeft="12.0dip" android:paddingRight="@dimen/uikit_spacing_small" android:layout_toLeftOf="@id/flex_input_send_btn_container" android:layout_toRightOf="@id/flex_input_left_btns_container" android:layout_centerVertical="true" android:backgroundTint="?colorBackgroundSecondaryAlt" style="@style/UiKit.ViewGroup.LinearLayout.Horizontal"> | ||||||
|  | *************** | ||||||
|  | *** 20,23 **** | ||||||
|  |           </FrameLayout> | ||||||
|  |       </RelativeLayout> | ||||||
|  |       <FrameLayout android:orientation="vertical" android:id="@id/flex_input_emoji_container" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/default_keyboard_height" /> | ||||||
|  | ! </LinearLayout>
 | ||||||
|  | \ No newline at end of file | ||||||
|  | --- 20,23 ----
 | ||||||
|  |           </FrameLayout> | ||||||
|  |       </RelativeLayout> | ||||||
|  |       <FrameLayout android:orientation="vertical" android:id="@id/flex_input_emoji_container" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/default_keyboard_height" /> | ||||||
|  | ! </LinearLayout>
 | ||||||
|  | diff -crB com.discord-1078-base/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali com.discord-1078/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali
 | ||||||
|  | *** com.discord-1078-base/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali	2020-03-26 10:35:58.538920667 +0300 | ||||||
|  | --- com.discord-1078/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali	2020-03-26 16:31:07.078498968 +0300
 | ||||||
|  | *************** | ||||||
|  | *** 35,146 **** | ||||||
|  |    | ||||||
|  |   # virtual methods | ||||||
|  |   .method public final onFocusChange(Landroid/view/View;Z)V | ||||||
|  | !     .locals 5
 | ||||||
|  | ! 
 | ||||||
|  | !     .line 1
 | ||||||
|  | !     iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment$f;->d:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
 | ||||||
|  | ! 
 | ||||||
|  | !     xor-int/lit8 p2, p2, 0x1
 | ||||||
|  | ! 
 | ||||||
|  | !     .line 2
 | ||||||
|  | !     iget-object v0, p1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->l:Landroid/view/View;
 | ||||||
|  | ! 
 | ||||||
|  | !     const/4 v1, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz v0, :cond_7
 | ||||||
|  | ! 
 | ||||||
|  | !     const/16 v2, 0x8
 | ||||||
|  | ! 
 | ||||||
|  | !     const/4 v3, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz p2, :cond_0
 | ||||||
|  | ! 
 | ||||||
|  | !     const/16 v4, 0x8
 | ||||||
|  | ! 
 | ||||||
|  | !     goto :goto_0
 | ||||||
|  | ! 
 | ||||||
|  | !     :cond_0
 | ||||||
|  | !     const/4 v4, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     :goto_0
 | ||||||
|  | !     invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
 | ||||||
|  | ! 
 | ||||||
|  | !     .line 3
 | ||||||
|  | !     iget-object v0, p1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->p:Landroid/view/View;
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz v0, :cond_6
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz p2, :cond_1
 | ||||||
|  | ! 
 | ||||||
|  | !     const/16 v4, 0x8
 | ||||||
|  | ! 
 | ||||||
|  | !     goto :goto_1
 | ||||||
|  | ! 
 | ||||||
|  | !     :cond_1
 | ||||||
|  | !     const/4 v4, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     :goto_1
 | ||||||
|  | !     invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
 | ||||||
|  | ! 
 | ||||||
|  | !     .line 4
 | ||||||
|  | !     iget-object v0, p1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->o:Landroid/view/View;
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz v0, :cond_5
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz p2, :cond_2
 | ||||||
|  | ! 
 | ||||||
|  | !     const/4 v4, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     goto :goto_2
 | ||||||
|  | ! 
 | ||||||
|  | !     :cond_2
 | ||||||
|  | !     const/16 v4, 0x8
 | ||||||
|  | ! 
 | ||||||
|  | !     :goto_2
 | ||||||
|  | !     invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V
 | ||||||
|  | ! 
 | ||||||
|  | !     .line 5
 | ||||||
|  | !     iget-object p1, p1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Landroid/view/View;
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz p1, :cond_4
 | ||||||
|  | ! 
 | ||||||
|  | !     if-eqz p2, :cond_3
 | ||||||
|  | ! 
 | ||||||
|  | !     const/4 v2, 0x0
 | ||||||
|  | ! 
 | ||||||
|  | !     :cond_3
 | ||||||
|  | !     invoke-virtual {p1, v2}, Landroid/view/View;->setVisibility(I)V
 | ||||||
|  |    | ||||||
|  |       return-void | ||||||
|  | - 
 | ||||||
|  | -     :cond_4
 | ||||||
|  | -     const-string p1, "galleryBtn"
 | ||||||
|  | - 
 | ||||||
|  | -     invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
 | ||||||
|  | - 
 | ||||||
|  | -     throw v1
 | ||||||
|  | - 
 | ||||||
|  | -     :cond_5
 | ||||||
|  | -     const-string p1, "cameraBtn"
 | ||||||
|  | - 
 | ||||||
|  | -     .line 6
 | ||||||
|  | -     invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
 | ||||||
|  | - 
 | ||||||
|  | -     throw v1
 | ||||||
|  | - 
 | ||||||
|  | -     :cond_6
 | ||||||
|  | -     const-string p1, "expandBtn"
 | ||||||
|  | - 
 | ||||||
|  | -     .line 7
 | ||||||
|  | -     invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
 | ||||||
|  | - 
 | ||||||
|  | -     throw v1
 | ||||||
|  | - 
 | ||||||
|  | -     :cond_7
 | ||||||
|  | -     const-string p1, "sendBtnContainer"
 | ||||||
|  | - 
 | ||||||
|  | -     .line 8
 | ||||||
|  | -     invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
 | ||||||
|  | - 
 | ||||||
|  | -     throw v1
 | ||||||
|  |   .end method | ||||||
|  | --- 35,41 ----
 | ||||||
|  |    | ||||||
|  |   # virtual methods | ||||||
|  |   .method public final onFocusChange(Landroid/view/View;Z)V | ||||||
|  | !     .locals 0
 | ||||||
|  |    | ||||||
|  |       return-void | ||||||
|  |   .end method | ||||||
|  | 
 | ||||||
							
								
								
									
										17
									
								
								patches/nocamerabutton/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								patches/nocamerabutton/README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | ||||||
|  | ## DisTok CutTheCord: No Camera Button | ||||||
|  | 
 | ||||||
|  | Self explanatory. | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | and | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | to | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | #### Available and tested on: | ||||||
|  | - 16-alpha4 | ||||||
|  | 
 | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue