Skip to content

Commit

Permalink
rebase to 14.5.2 (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
FoseFx committed Feb 24, 2023
1 parent 9984090 commit aac9c94
Show file tree
Hide file tree
Showing 63 changed files with 308 additions and 320 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# set env variables
- name: set variables
run: |
echo "APK_URL=https://www.dropbox.com/s/a2phwibrqjozpw7/twitch-14.4.2.apk\?\dl=1" >> $GITHUB_ENV
echo "APK_URL=https://www.dropbox.com/s/f4tkfdnk4xmifom/twitch-14.5.2.apk\?\dl=1" >> $GITHUB_ENV
# get keystore.kjs from secret
- name: create keystore.kjs from secret
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# master
- rebase to v14.5.2
- fix login issues

# 0.35.1-beta
- add toggle to control automatic update checks
- fix sleep timer for livestreams
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ A mod of the Twitch Android Mobile<sup><a href="#no-tv">1</a></sup> App adding B

# Build it yourself

> This patch is meant to be applied to version **14.3.2** of the official twitch app
> This patch is meant to be applied to version **14.5.2** of the official twitch app
> Make sure you use this version before you create an issue!
## Easy way: Docker
Expand Down Expand Up @@ -128,7 +128,7 @@ Made with ♥️ by [@FoseFx](https://github.com/FoseFx) and contributors. MIT L
[license-badge]: https://img.shields.io/github/license/bttv-android/bttv?style=flat-square
[license-file]: ./LICENSE
[bttv-version]: https://img.shields.io/github/v/release/bttv-android/bttv?style=flat-square
[base-version]: https://img.shields.io/badge/build%20on-v14.3.2-blueviolet?style=flat-square
[base-version]: https://img.shields.io/badge/build%20on-v14.5.2-blueviolet?style=flat-square
[downloads-latest]: https://img.shields.io/github/downloads/bttv-android/bttv/latest/total?color=yellow&style=flat-square
[downloads-total]: https://img.shields.io/github/downloads/bttv-android/bttv/total?color=yellowgreen&label=downloads%20total&style=flat-square
[latest-release]: https://github.com/bttv-android/bttv/releases/latest
Expand Down
3 changes: 1 addition & 2 deletions mod/app/src/main/java/bttv/ChommentModelDelegateWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import java.util.List;

import bttv.highlight.Highlight;
import kotlin.jvm.internal.BTTVDefaultConstructorMarker;
import tv.twitch.android.models.chat.MessageToken;
import tv.twitch.android.models.chomments.ChommentModel;
import tv.twitch.android.provider.chat.model.ChatMessageTokenizerWrapper;
import tv.twitch.android.shared.chat.pub.model.ChatMessageTokenizerWrapper;
import tv.twitch.android.provider.experiments.ExperimentHelper;
import tv.twitch.android.sdk.SDKServicesController;
import tv.twitch.android.shared.chat.ChatMessageParser;
Expand Down
2 changes: 1 addition & 1 deletion mod/app/src/main/java/bttv/Tokenizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import tv.twitch.android.models.chat.MessageToken.TextToken;
import tv.twitch.android.models.chat.MessageToken;
import tv.twitch.android.models.chat.MessageToken.EmoticonToken;
import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;
import tv.twitch.android.shared.chat.ChatMessageDelegate;
import tv.twitch.chat.AutoModFlags;
import tv.twitch.chat.ChatEmoticonToken;
Expand Down
4 changes: 3 additions & 1 deletion mod/app/src/main/java/bttv/api/Bits.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
import tv.twitch.android.shared.bits.BitsSpendingPresenter;

public class Bits {
private static final String TAG = "LBTTVBits";

public static void onBuyBitsButtonClick(BitsSpendingPresenter bitsSpendingPresenter) {
try {
BitsRedirect.openBitsPage(bitsSpendingPresenter);
} catch (Throwable t) {
Log.e("LBTTVBits", "onBuyBitsButtonClick: ", t);
Log.e(TAG, "onBuyBitsButtonClick: ", t);
}
}
}
2 changes: 1 addition & 1 deletion mod/app/src/main/java/bttv/api/Blacklist.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import android.util.Log;

import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;
import tv.twitch.android.shared.chat.ChatMessageDelegate;

public class Blacklist {
Expand Down
2 changes: 1 addition & 1 deletion mod/app/src/main/java/bttv/api/Highlight.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package bttv.api;

import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;

public class Highlight {
public static Integer replaceNum(ChatMessageInterface chatMessageInterface, boolean z, boolean z2, int i, int i2, Object iClickableUsernameSpanListener, Object twitchUrlSpanClickListener, Object webViewSource, String str, boolean z3, Object chatFiltersSettings, Integer num) {
Expand Down
16 changes: 1 addition & 15 deletions mod/app/src/main/java/bttv/highlight/Highlight.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
package bttv.highlight;

import android.app.Activity;
import android.app.AlertDialog;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Set;

import bttv.ChommentModelDelegateWrapper;
import bttv.Data;
import bttv.Res;
import bttv.ResUtil;
import bttv.settings.Settings;
import bttv.settings.UserPreferences;
import tv.twitch.android.shared.chat.ChatMessageDelegate;
import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;

public class Highlight extends StringSetUI {
private static Highlight INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import tv.twitch.android.models.chat.MessageBadge;
import tv.twitch.android.models.chat.MessageToken;
import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;
import tv.twitch.chat.ChatMessageInfo;

public class ChatMessageDelegate implements ChatMessageInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@

import java.util.List;

import kotlin.jvm.internal.BTTVDefaultConstructorMarker;
import tv.twitch.android.models.chat.MessageBadge;
import tv.twitch.android.models.chat.MessageToken;
import tv.twitch.android.models.chomments.ChommentModel;
import tv.twitch.android.provider.chat.model.ChatMessageTokenizerWrapper;
import tv.twitch.android.shared.chat.pub.model.ChatMessageTokenizerWrapper;
import tv.twitch.android.provider.experiments.ExperimentHelper;
import tv.twitch.android.sdk.SDKServicesController;
import tv.twitch.android.provider.chat.ChatMessageInterface;
import tv.twitch.android.shared.chat.pub.ChatMessageInterface;
import tv.twitch.android.shared.chat.ChatMessageParser;

public class ChommentModelDelegate implements ChatMessageInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file is a stub, so javac does not throw errors,
* it is not used in the patches.
*/
package tv.twitch.android.provider.chat;
package tv.twitch.android.shared.chat.pub;

public interface ChatMessageInterface {
java.util.List<tv.twitch.android.models.chat.MessageBadge> getBadges();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tv.twitch.android.provider.chat.model;
package tv.twitch.android.shared.chat.pub.model;

public interface ChatMessageTokenizerWrapper {
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.view.View;
import kotlin.jvm.internal.BTTVDefaultConstructorMarker;
import tv.twitch.android.shared.ui.menus.SettingsPreferencesController;
import tv.twitch.android.shared.ui.menus.formvalue.FormValueDelegate;

public class ToggleMenuModel extends tv.twitch.android.shared.ui.menus.core.MenuModel.SingleItemModel {

Expand Down
19 changes: 7 additions & 12 deletions patches/AndroidManifest.xml.patch
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ diff --git a/AndroidManifest.xml b/AndroidManifest.xml
<uses-permission android:maxSdkVersion="32" android:name="android.permission.READ_EXTERNAL_STORAGE" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
@@ -180,14 +192,14 @@
@@ -173,14 +185,14 @@
<action android:name="android.intent.action.MEDIA_BUTTON"/>
</intent-filter>
</service>
<service android:name="tv.twitch.android.shared.app.indexing.AppIndexingUpdateService" android:permission="android.permission.BIND_JOB_SERVICE"/>
- <provider android:authorities="tv.twitch.android.app.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
+ <provider android:authorities="tv.twitch.bttvandroid.app.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
Expand All @@ -44,21 +44,16 @@ diff --git a/AndroidManifest.xml b/AndroidManifest.xml
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_jgBdao5vVtyZ3hdckxy8jlkkzqooQltZ"/>
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_test_ahupan1EKvF7XkpepyA3vpfivrdlOlMg"/>
<meta-data android:name="io.branch.sdk.TestMode" android:value="false"/>
@@ -244,11 +256,11 @@
</receiver>
<activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
<meta-data android:name="com.bumptech.glide.integration.okhttp3.OkHttpGlideModule" android:value="GlideModule"/>
- <provider android:authorities="tv.twitch.android.app.firebaseinitprovider" android:directBootAware="true" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
+ <provider android:authorities="tv.twitch.bttvandroid.app.firebaseinitprovider" android:directBootAware="true" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
@@ -238,7 +250,7 @@
<receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementReceiver"/>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService"/>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
- <provider android:authorities="tv.twitch.android.app.mobileadsinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.android.gms.ads.MobileAdsInitProvider"/>
+ <provider android:authorities="tv.twitch.bttvandroid.app.mobileadsinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.android.gms.ads.MobileAdsInitProvider"/>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.ads.AdService"/>
- <provider android:authorities="tv.twitch.android.app.firebaseinitprovider" android:directBootAware="true" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
+ <provider android:authorities="tv.twitch.bttvandroid.app.firebaseinitprovider" android:directBootAware="true" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<service android:directBootAware="false" android:enabled="@bool/enable_system_alarm_service_default" android:exported="false" android:name="androidx.work.impl.background.systemalarm.SystemAlarmService"/>
@@ -337,5 +349,18 @@
<service android:directBootAware="false" android:enabled="@bool/enable_system_job_service_default" android:exported="true" android:name="androidx.work.impl.background.systemjob.SystemJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
@@ -326,5 +338,18 @@
<action android:name="com.amazon.dcp.sso.action.session.users.changed"/>
</intent-filter>
</receiver>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smali b/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smali
--- a/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smali
+++ b/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smali
@@ -37,7 +37,7 @@
diff --git a/smali_classes5/tv/twitch/android/shared/chat/ChatViewPresenter.smali b/smali_classes5/tv/twitch/android/shared/chat/ChatViewPresenter.smali
--- a/smali_classes5/tv/twitch/android/shared/chat/ChatViewPresenter.smali
+++ b/smali_classes5/tv/twitch/android/shared/chat/ChatViewPresenter.smali
@@ -38,7 +38,7 @@

.field private final buildConfigUtil:Ltv/twitch/android/core/buildconfig/BuildConfigUtil;

Expand All @@ -10,16 +10,16 @@ diff --git a/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smal

.field private channelInfo:Ltv/twitch/chat/ChatChannelInfo;

@@ -65,7 +65,7 @@
@@ -66,7 +66,7 @@

.field private chatConnectDisposable:Lio/reactivex/disposables/Disposable;

-.field private final chatConnectionController:Ltv/twitch/android/shared/chat/observables/ChatConnectionController;
+.field public final chatConnectionController:Ltv/twitch/android/shared/chat/observables/ChatConnectionController; # BTTV: private -> publix

.field private final chatDialogRouter:Ltv/twitch/android/provider/chat/ChatDialogRouter;
.field private final chatDialogRouter:Ltv/twitch/android/shared/chat/pub/ChatDialogRouter;

@@ -1439,6 +1439,9 @@
@@ -1455,6 +1455,9 @@

iput-object v1, v0, Ltv/twitch/android/shared/chat/ChatViewPresenter;->clickableUsernameSpanListener:Ltv/twitch/android/shared/chat/chatsource/IClickableUsernameSpanListener;

Expand All @@ -29,7 +29,7 @@ diff --git a/smali_classes6/tv/twitch/android/shared/chat/ChatViewPresenter.smal
return-void
.end method

@@ -2238,6 +2241,13 @@
@@ -2263,6 +2266,13 @@
:cond_0
return-void
.end method
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/smali_classes6/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali b/smali_classes6/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
--- a/smali_classes6/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
+++ b/smali_classes6/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
@@ -3017,6 +3017,11 @@
diff --git a/smali_classes5/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali b/smali_classes5/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
--- a/smali_classes5/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
+++ b/smali_classes5/tv/twitch/android/shared/chat/messageinput/ChatMessageInputViewPresenter.smali
@@ -3222,6 +3222,11 @@

const/4 v1, 0x0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git a/smali_classes6/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali b/smali_classes6/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
--- a/smali_classes6/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
+++ b/smali_classes6/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
diff --git a/smali_classes5/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali b/smali_classes5/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
--- a/smali_classes5/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
+++ b/smali_classes5/tv/twitch/android/shared/chat/observables/ChatConnectionController.smali
@@ -243,7 +243,7 @@

.field private viewer:Ltv/twitch/android/models/UserModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff --git a/smali_classes6/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali b/smali_classes6/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
--- a/smali_classes6/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
+++ b/smali_classes6/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
diff --git a/smali_classes5/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali b/smali_classes5/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
--- a/smali_classes5/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
+++ b/smali_classes5/tv/twitch/android/shared/community/points/viewdelegate/CommunityPointsButtonViewDelegate.smali
@@ -633,6 +633,13 @@

invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/smali_classes5/tv/twitch/android/shared/bits/BitsSpendingPresenter$maybeShowBuyBitsButton$1$2.smali b/smali_classes5/tv/twitch/android/shared/bits/BitsSpendingPresenter$maybeShowBuyBitsButton$1$2.smali
--- a/smali_classes5/tv/twitch/android/shared/bits/BitsSpendingPresenter$maybeShowBuyBitsButton$1$2.smali
+++ b/smali_classes5/tv/twitch/android/shared/bits/BitsSpendingPresenter$maybeShowBuyBitsButton$1$2.smali
@@ -66,6 +66,12 @@
.line 536
iget-object v0, p0, Ltv/twitch/android/shared/bits/BitsSpendingPresenter$maybeShowBuyBitsButton$1$2;->this$0:Ltv/twitch/android/shared/bits/BitsSpendingPresenter;

+ # BTTV
+ # Set up BitsButton-Click-Handler
+ invoke-static {v0}, Lbttv/api/Bits;->onBuyBitsButtonClick(Ltv/twitch/android/shared/bits/BitsSpendingPresenter;)V
+ goto :bttv_skip
+ # /BTTV
+
invoke-static {v0}, Ltv/twitch/android/shared/bits/BitsSpendingPresenter;->access$getUiCallbacks$p(Ltv/twitch/android/shared/bits/BitsSpendingPresenter;)Ltv/twitch/android/shared/bits/BitsUiCallbacks;

move-result-object v0
@@ -94,5 +100,6 @@

invoke-virtual {v0, v1}, Ltv/twitch/android/shared/bits/BitsTracker;->trackBuyBitsButtonClicked(I)V

+ :bttv_skip
return-void
.end method
Loading

0 comments on commit aac9c94

Please sign in to comment.