Fixes potential crashes
This commit is contained in:
parent
71d533dadf
commit
120ce335fd
|
@ -314,6 +314,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
|||
if(isAccountPrivate){
|
||||
if( tootReply == null) {
|
||||
visibility = "private";
|
||||
toot_visibility.setImageResource(R.drawable.ic_action_lock_closed);
|
||||
}else {
|
||||
if( visibility.equals("direct") ){
|
||||
toot_visibility.setImageResource(R.drawable.ic_local_post_office);
|
||||
|
|
|
@ -76,7 +76,7 @@ public class StreamingUserAsyncTask extends AsyncTask {
|
|||
if( connectionHashMap.get(acct+userId) != null) {
|
||||
try {
|
||||
connectionAlive = (connectionHashMap.get(acct + userId).getResponseCode() == 200);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
connectionAlive = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,10 +263,6 @@ public class StreamingService extends Service implements OnRetrieveStreamingInte
|
|||
//User receiving the notification is connected and application is to front, notification won't be pushed
|
||||
//Instead, the interaction is done in the activity
|
||||
if( activityVisible && isCurrentAccountLoggedIn(acct, userId)){
|
||||
//If the owner published the toot we stop
|
||||
if( event == StreamingUserAsyncTask.EventStreaming.UPDATE && account != null &&
|
||||
status.getAccount().getAcct().trim().equals(acct.trim()) && status.getAccount().getId().trim().equals(userId.trim()))
|
||||
return;
|
||||
notify = false;
|
||||
Intent intentBC = new Intent(Helper.RECEIVE_DATA);
|
||||
intentBC.putExtra("eventStreaming", event);
|
||||
|
|
Loading…
Reference in New Issue