mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-02-12 01:30:42 -06:00
bugfixes
This commit is contained in:
@@ -198,6 +198,10 @@ public class AutoFrameRateManager extends PlayerEventListenerHelper implements A
|
||||
}
|
||||
|
||||
private void maybePausePlayback() {
|
||||
if (getController() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
getController().setAfrRunning(true);
|
||||
int delayMs = 5_000;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public class PlaybackPresenter extends BasePresenter<PlaybackView> {
|
||||
|
||||
public void setPosition(String timeCode) {
|
||||
// Check that the user isn't open context menu on suggestion item
|
||||
if (Utils.isPlayerInForeground(getContext()) && !getView().getController().isSuggestionsShown()) {
|
||||
if (Utils.isPlayerInForeground(getContext()) && getView() != null && !getView().getController().isSuggestionsShown()) {
|
||||
getView().getController().setPositionMs(ServiceHelper.timeTextToMillis(timeCode));
|
||||
} else {
|
||||
Video video = VideoMenuPresenter.sVideoHolder.get();
|
||||
|
||||
@@ -186,7 +186,12 @@ public class WebProxyDialog {
|
||||
|
||||
mProxyConfigDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener((view) -> {
|
||||
((TextView) mProxyConfigDialog.findViewById(R.id.proxy_config_message)).setText("");
|
||||
Proxy proxy = validateProxyConfigFields();
|
||||
Proxy proxy = null;
|
||||
try {
|
||||
proxy = validateProxyConfigFields();
|
||||
} catch (IllegalArgumentException e) { // port out of range
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (proxy == null) {
|
||||
appendStatusMessage(R.string.proxy_application_aborted);
|
||||
} else {
|
||||
@@ -211,7 +216,12 @@ public class WebProxyDialog {
|
||||
});
|
||||
|
||||
mProxyConfigDialog.setOnDismissListener(dialog -> {
|
||||
Proxy proxy = validateProxyConfigFields();
|
||||
Proxy proxy = null;
|
||||
try {
|
||||
proxy = validateProxyConfigFields();
|
||||
} catch (IllegalArgumentException e) { // port out of range
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (proxy != null) {
|
||||
Log.d(TAG, "Saving proxy info: " + proxy);
|
||||
mProxyManager.saveProxyInfoToPrefs(proxy, true);
|
||||
|
||||
Reference in New Issue
Block a user