do not try to re-subscribe local syncs remotely whhen merging

This commit is contained in:
Akinwale Ariwodola 2020-07-21 19:47:03 +01:00
parent 5d026344e7
commit 6132838cc1
2 changed files with 1 additions and 25 deletions

View file

@ -2644,7 +2644,6 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
LbryAnalytics.logEvent(LbryAnalytics.EVENT_LBRY_NOTIFICATION_OPEN, bundle);
}
private void registerServiceActionsReceiver() {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(DownloadManager.ACTION_DOWNLOAD_EVENT);
@ -2806,9 +2805,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
JSONObject startupStatus = status.getJSONObject("startup_status");
sdkReady = startupStatus.getBoolean("file_manager") && startupStatus.getBoolean("wallet");
}
} catch (ConnectException ex) {
// pass
} catch (JSONException ex) {
} catch (ConnectException | JSONException ex) {
// pass
}

View file

@ -106,27 +106,6 @@ public class MergeSubscriptionsTask extends AsyncTask<Void, Void, List<Subscript
}
}
for (int i = 0; i < combined.size(); i++) {
Subscription local = combined.get(i);
if (!finalRemoteSubs.contains(local)) {
// add to remote subscriptions
try {
LbryUri uri = LbryUri.parse(local.getUrl());
Map<String, String> options = new HashMap<>();
String channelClaimId = uri.getChannelClaimId();
String channelName = Helper.normalizeChannelName(local.getChannelName());
if (!Helper.isNullOrEmpty(channelClaimId) && !Helper.isNullOrEmpty(channelName)) {
options.put("claim_id", channelClaimId);
options.put("channel_name", channelName);
Lbryio.parseResponse(Lbryio.call("subscription", "new", options, context));
}
} catch (LbryUriException | LbryioRequestException | LbryioResponseException ex) {
// pass
Log.e(TAG, String.format("subscription/new failed: %s", ex.getMessage()), ex);
}
}
}
if (!replaceLocal) {
for (int i = 0; i < localSubs.size(); i++) {
Subscription local = localSubs.get(i);