ctx menu: unsub fix; view manager: start activity: remove delay
This commit is contained in:
parent
842e74c2b0
commit
7620b09a5d
|
@ -48,6 +48,7 @@ allprojects {
|
|||
resolutionStrategy.force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:' + kotlinVersion
|
||||
resolutionStrategy.force 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:' + kotlinVersion
|
||||
resolutionStrategy.force 'org.jetbrains.kotlin:kotlin-stdlib:' + kotlinVersion
|
||||
resolutionStrategy.force 'org.jetbrains.kotlinx:kotlinx-coroutines-android:' + kotlinxVersion
|
||||
resolutionStrategy.force 'androidx.annotation:annotation:' + annotationXLibraryVersion
|
||||
// Downgrade Cronet version for cronet-okhttp
|
||||
resolutionStrategy.force 'org.chromium.net:cronet-api:' + cronetApiVersion
|
||||
|
|
|
@ -630,9 +630,11 @@ public class VideoMenuPresenter extends BaseMenuPresenter {
|
|||
return;
|
||||
}
|
||||
|
||||
mVideo.isSubscribed = mVideo.isSubscribed || mVideo.belongsToSubscriptions() || mVideo.belongsToChannelUploads();
|
||||
|
||||
mDialogPresenter.appendSingleButton(
|
||||
UiOptionItem.from(getContext().getString(
|
||||
mVideo.isSubscribed || mVideo.belongsToSubscriptions() || mVideo.belongsToChannelUploads() ?
|
||||
mVideo.isSubscribed ?
|
||||
R.string.unsubscribe_from_channel : R.string.subscribe_to_channel),
|
||||
optionItem -> toggleSubscribe()));
|
||||
}
|
||||
|
|
|
@ -411,15 +411,6 @@ public class ViewManager {
|
|||
* View=android.widget.TextView not attached to window manager
|
||||
*/
|
||||
private void safeStartActivity(Context context, Intent intent) {
|
||||
// Small delay to fix PIP bug
|
||||
Utils.postDelayed(() -> safeStartActivityInt(context, intent), 50);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix: java.lang.IllegalArgumentException<br/>
|
||||
* View=android.widget.TextView not attached to window manager
|
||||
*/
|
||||
private void safeStartActivityInt(Context context, Intent intent) {
|
||||
try {
|
||||
context.startActivity(intent);
|
||||
} catch (IllegalArgumentException | ActivityNotFoundException e) {
|
||||
|
@ -428,6 +419,28 @@ public class ViewManager {
|
|||
}
|
||||
}
|
||||
|
||||
///**
|
||||
// * Fix: java.lang.IllegalArgumentException<br/>
|
||||
// * View=android.widget.TextView not attached to window manager
|
||||
// */
|
||||
//private void safeStartActivity(Context context, Intent intent) {
|
||||
// // Small delay to fix PIP bug
|
||||
// Utils.postDelayed(() -> safeStartActivityInt(context, intent), 50);
|
||||
//}
|
||||
//
|
||||
///**
|
||||
// * Fix: java.lang.IllegalArgumentException<br/>
|
||||
// * View=android.widget.TextView not attached to window manager
|
||||
// */
|
||||
//private void safeStartActivityInt(Context context, Intent intent) {
|
||||
// try {
|
||||
// context.startActivity(intent);
|
||||
// } catch (IllegalArgumentException | ActivityNotFoundException e) {
|
||||
// Log.e(TAG, "Error when starting activity: %s", e.getMessage());
|
||||
// MessageHelpers.showLongMessage(context, e.getLocalizedMessage());
|
||||
// }
|
||||
//}
|
||||
|
||||
public boolean isFinishing() {
|
||||
return mIsFinishing;
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@ android {
|
|||
applicationId "com.liskovsoft.smarttubetv"
|
||||
minSdkVersion project.properties.minSdkVersion
|
||||
targetSdkVersion project.properties.targetSdkVersion
|
||||
versionCode 1244
|
||||
versionName "20.54"
|
||||
versionCode 1245
|
||||
versionName "20.55"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
|
||||
|
||||
|
|
Loading…
Reference in New Issue