This repository has been archived on 2021-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
cutthecord/resources/patches/nocamerabutton/1085.patch

186 lines
13 KiB
Diff
Raw Normal View History

2020-03-30 17:39:19 +00:00
diff -crB com.discord-1084-base/res/layout/flex_input_widget.xml com.discord-1084/res/layout/flex_input_widget.xml
*** com.discord-1084-base/res/layout/flex_input_widget.xml 2020-03-28 05:14:07.209137278 +0300
--- com.discord-1084/res/layout/flex_input_widget.xml 2020-03-28 05:15:16.036289982 +0300
***************
*** 8,21 ****
<RelativeLayout android:paddingLeft="5.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: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_marginLeft="6.0dip" 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">
<com.lytefast.flexinput.widget.FlexEditText android:textColor="?colorTextNormal" android:textColorHint="?colorTextMuted" android:gravity="center_vertical" android:id="@id/flex_input_text_input" android:background="@android:color/transparent" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0.0dip" android:layout_height="wrap_content" android:hint="@string/send_a_message" android:maxLines="5" android:layout_weight="1.0" android:inputType="textAutoComplete|textMultiLine|textShortMessage" />
<androidx.appcompat.widget.AppCompatImageButton android:layout_gravity="center_vertical" android:id="@id/flex_input_emoji_btn" android:background="@null" android:padding="@dimen/uikit_spacing_medium" android:visibility="gone" android:src="@drawable/ic_emoji_24dp" android:tint="?colorInteractiveNormal" android:drawablePadding="0.0dip" android:contentDescription="@string/emoji" style="@style/UiKit.ImageButton" />
</LinearLayout>
! <FrameLayout android:id="@id/flex_input_send_btn_container" android:background="@drawable/drawable_circle_black" android:visibility="gone" android:clipToPadding="false" android:layout_width="40.0dip" android:layout_height="40.0dip" android:layout_marginLeft="@dimen/uikit_spacing_medium" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:contentDescription="@string/send_message" android:backgroundTint="?chat_send_btn_bg">
<ImageView android:layout_gravity="center" android:id="@id/flex_input_send_btn_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_send_24dp" android:tint="?chat_send_btn" android:importantForAccessibility="no" />
</FrameLayout>
</RelativeLayout>
--- 8,21 ----
<RelativeLayout android:paddingLeft="5.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: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_marginLeft="6.0dip" 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">
<com.lytefast.flexinput.widget.FlexEditText android:textColor="?colorTextNormal" android:textColorHint="?colorTextMuted" android:gravity="center_vertical" android:id="@id/flex_input_text_input" android:background="@android:color/transparent" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0.0dip" android:layout_height="wrap_content" android:hint="@string/send_a_message" android:maxLines="5" android:layout_weight="1.0" android:inputType="textAutoComplete|textMultiLine|textShortMessage" />
<androidx.appcompat.widget.AppCompatImageButton android:layout_gravity="center_vertical" android:id="@id/flex_input_emoji_btn" android:background="@null" android:padding="@dimen/uikit_spacing_medium" android:visibility="gone" android:src="@drawable/ic_emoji_24dp" android:tint="?colorInteractiveNormal" android:drawablePadding="0.0dip" android:contentDescription="@string/emoji" style="@style/UiKit.ImageButton" />
</LinearLayout>
! <FrameLayout android:id="@id/flex_input_send_btn_container" android:background="@drawable/drawable_circle_black" android:clipToPadding="false" android:layout_width="40.0dip" android:layout_height="40.0dip" android:layout_marginLeft="@dimen/uikit_spacing_medium" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:contentDescription="@string/send_message" android:backgroundTint="?chat_send_btn_bg">
<ImageView android:layout_gravity="center" android:id="@id/flex_input_send_btn_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_send_24dp" android:tint="?chat_send_btn" android:importantForAccessibility="no" />
</FrameLayout>
</RelativeLayout>
Only in com.discord-1084/res/layout: flex_input_widget.xml.orig
Only in com.discord-1084/res/layout: flex_input_widget.xml.rej
diff -crB com.discord-1084-base/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali com.discord-1084/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali
*** com.discord-1084-base/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali 2020-03-28 05:14:11.475834075 +0300
--- com.discord-1084/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment$f.smali 2020-03-28 05:16:08.203325040 +0300
***************
*** 35,167 ****
# 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_9
!
! const/16 v2, 0x8
!
! const/4 v3, 0x0
!
! if-eqz p2, :cond_2
!
! iget-object v4, p1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->u:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
!
! if-eqz v4, :cond_1
!
! invoke-virtual {v4}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->getItemCount()I
!
! move-result v4
!
! if-lez v4, :cond_0
!
! goto :goto_0
!
! :cond_0
! const/16 v4, 0x8
!
! goto :goto_1
!
! :cond_1
! const-string p1, "attachmentPreviewAdapter"
!
! invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
!
! throw v1
!
! :cond_2
! :goto_0
! const/4 v4, 0x0
!
! :goto_1
! 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_8
!
! if-eqz p2, :cond_3
!
! const/16 v4, 0x8
!
! goto :goto_2
!
! :cond_3
! const/4 v4, 0x0
!
! :goto_2
! 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_7
!
! if-eqz p2, :cond_4
!
! const/4 v4, 0x0
!
! goto :goto_3
!
! :cond_4
! const/16 v4, 0x8
!
! :goto_3
! 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_6
!
! if-eqz p2, :cond_5
!
! const/4 v2, 0x0
!
! :cond_5
! invoke-virtual {p1, v2}, Landroid/view/View;->setVisibility(I)V
return-void
-
- :cond_6
- const-string p1, "galleryBtn"
-
- invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
-
- throw v1
-
- :cond_7
- const-string p1, "cameraBtn"
-
- .line 6
- invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
-
- throw v1
-
- :cond_8
- const-string p1, "expandBtn"
-
- .line 7
- invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
-
- throw v1
-
- :cond_9
- const-string p1, "sendBtn"
-
- .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
Only in com.discord-1084/smali_classes2/com/lytefast/flexinput/fragment: FlexInputFragment$f.smali.orig
Only in com.discord-1084/smali_classes2/com/lytefast/flexinput/fragment: FlexInputFragment$f.smali.rej