Fix additional Play Store crash bugs.
This commit is contained in:
parent
4c50ffac19
commit
94b0c7bc01
3 changed files with 9 additions and 3 deletions
|
@ -255,6 +255,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
public static final String ACTION_USER_AUTHENTICATION_FAILED = "io.lbry.browser.Broadcast.UserAuthenticationFailed";
|
public static final String ACTION_USER_AUTHENTICATION_FAILED = "io.lbry.browser.Broadcast.UserAuthenticationFailed";
|
||||||
public static final String ACTION_NOW_PLAYING_CLAIM_UPDATED = "io.lbry.browser.Broadcast.NowPlayingClaimUpdated";
|
public static final String ACTION_NOW_PLAYING_CLAIM_UPDATED = "io.lbry.browser.Broadcast.NowPlayingClaimUpdated";
|
||||||
public static final String ACTION_NOW_PLAYING_CLAIM_CLEARED = "io.lbry.browser.Broadcast.NowPlayingClaimCleared";
|
public static final String ACTION_NOW_PLAYING_CLAIM_CLEARED = "io.lbry.browser.Broadcast.NowPlayingClaimCleared";
|
||||||
|
public static final String ACTION_PUBLISH_SUCCESSFUL = "io.lbry.browser.Broadcast.PublishSuccessful";
|
||||||
public static final String ACTION_OPEN_ALL_CONTENT_TAG = "io.lbry.browser.Broadcast.OpenAllContentTag";
|
public static final String ACTION_OPEN_ALL_CONTENT_TAG = "io.lbry.browser.Broadcast.OpenAllContentTag";
|
||||||
public static final String ACTION_WALLET_BALANCE_UPDATED = "io.lbry.browser.Broadcast.WalletBalanceUpdated";
|
public static final String ACTION_WALLET_BALANCE_UPDATED = "io.lbry.browser.Broadcast.WalletBalanceUpdated";
|
||||||
public static final String ACTION_OPEN_CHANNEL_URL = "io.lbry.browser.Broadcast.OpenChannelUrl";
|
public static final String ACTION_OPEN_CHANNEL_URL = "io.lbry.browser.Broadcast.OpenChannelUrl";
|
||||||
|
@ -1842,6 +1843,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
intentFilter.addAction(ACTION_OPEN_CHANNEL_URL);
|
intentFilter.addAction(ACTION_OPEN_CHANNEL_URL);
|
||||||
intentFilter.addAction(ACTION_OPEN_WALLET_PAGE);
|
intentFilter.addAction(ACTION_OPEN_WALLET_PAGE);
|
||||||
intentFilter.addAction(ACTION_OPEN_REWARDS_PAGE);
|
intentFilter.addAction(ACTION_OPEN_REWARDS_PAGE);
|
||||||
|
intentFilter.addAction(ACTION_PUBLISH_SUCCESSFUL);
|
||||||
intentFilter.addAction(ACTION_SAVE_SHARED_USER_STATE);
|
intentFilter.addAction(ACTION_SAVE_SHARED_USER_STATE);
|
||||||
requestsReceiver = new BroadcastReceiver() {
|
requestsReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1861,6 +1863,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
pendingOpenRewardsPage = true;
|
pendingOpenRewardsPage = true;
|
||||||
} else if (ACTION_SAVE_SHARED_USER_STATE.equalsIgnoreCase(action)) {
|
} else if (ACTION_SAVE_SHARED_USER_STATE.equalsIgnoreCase(action)) {
|
||||||
saveSharedUserState();
|
saveSharedUserState();
|
||||||
|
} else if (ACTION_PUBLISH_SUCCESSFUL.equalsIgnoreCase(action)) {
|
||||||
|
openPublishesOnSuccessfulPublish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1102,7 +1102,7 @@ public class PublishFormFragment extends BaseFragment implements
|
||||||
if (context instanceof MainActivity) {
|
if (context instanceof MainActivity) {
|
||||||
MainActivity activity = (MainActivity) context;
|
MainActivity activity = (MainActivity) context;
|
||||||
activity.showMessage(R.string.publish_successful);
|
activity.showMessage(R.string.publish_successful);
|
||||||
activity.openPublishesOnSuccessfulPublish();
|
activity.sendBroadcast(new Intent(MainActivity.ACTION_PUBLISH_SUCCESSFUL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -286,8 +286,10 @@ public class RewardsFragment extends BaseFragment implements RewardListAdapter.R
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Exception error) {
|
public void onError(Exception error) {
|
||||||
Snackbar.make(getView(), error.getMessage(), Snackbar.LENGTH_LONG).
|
View view = getView();
|
||||||
setBackgroundTint(Color.RED).setTextColor(Color.WHITE).show();
|
if (view != null && error != null && !Helper.isNullOrEmpty(error.getMessage())) {
|
||||||
|
Snackbar.make(view, error.getMessage(), Snackbar.LENGTH_LONG).setBackgroundTint(Color.RED).setTextColor(Color.WHITE).show();
|
||||||
|
}
|
||||||
Helper.setViewEnabled(buttonClaim, true);
|
Helper.setViewEnabled(buttonClaim, true);
|
||||||
Helper.setViewEnabled(inputClaimCode, true);
|
Helper.setViewEnabled(inputClaimCode, true);
|
||||||
rewardClaimInProgress = false;
|
rewardClaimInProgress = false;
|
||||||
|
|
Loading…
Reference in a new issue