Some fixes
This commit is contained in:
parent
a27ffa3dfa
commit
43b8cf829a
|
@ -178,7 +178,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
lv_status.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy)
|
||||
{
|
||||
if (context instanceof BaseMainActivity ) {
|
||||
if (type != RetrieveFeedsAsyncTask.Type.ART && context instanceof BaseMainActivity ) {
|
||||
if( dy < 0 && !((BaseMainActivity)context).getFloatingVisibility() )
|
||||
((BaseMainActivity) context).manageFloatingButton(true);
|
||||
if( dy > 0 && ((BaseMainActivity)context).getFloatingVisibility() )
|
||||
|
@ -225,12 +225,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
editor.apply();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||
|
||||
super.onScrollStateChanged(recyclerView, newState);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ import java.security.KeyManagementException;
|
|||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import fr.gouv.etalab.mastodon.R;
|
||||
import fr.gouv.etalab.mastodon.activities.MainActivity;
|
||||
|
@ -186,11 +185,9 @@ public class LiveNotificationService extends Service implements NetworkStateRece
|
|||
AsyncHttpRequest.setDefaultHeaders(headers, url);
|
||||
if( webSocketFutures.containsKey(urlKey) ){
|
||||
try {
|
||||
if( webSocketFutures.get(urlKey) != null && webSocketFutures.get(urlKey).get() != null)
|
||||
if( webSocketFutures.get(urlKey) != null && webSocketFutures.get(urlKey).get() != null && webSocketFutures.get(urlKey).get().isOpen())
|
||||
webSocketFutures.get(urlKey).get().close();
|
||||
} catch (ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InterruptedException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue