Some fixes
This commit is contained in:
parent
b286e485f5
commit
898669978c
|
@ -97,6 +97,8 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import com.varunest.sparkbutton.SparkButton;
|
import com.varunest.sparkbutton.SparkButton;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -245,9 +247,8 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
public void onAttachedToRecyclerView(@NotNull RecyclerView recyclerView) {
|
||||||
super.onAttachedToRecyclerView(recyclerView);
|
super.onAttachedToRecyclerView(recyclerView);
|
||||||
|
|
||||||
mRecyclerView = recyclerView;
|
mRecyclerView = recyclerView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,6 +267,18 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
swipeRefreshLayout.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
swipeRefreshLayout.setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveNotifications(APIResponse apiResponse, Account account, boolean refreshData) {
|
public void onRetrieveNotifications(APIResponse apiResponse, Account account, boolean refreshData) {
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
|
|
|
@ -411,6 +411,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
@Override
|
@Override
|
||||||
public void onPause(){
|
public void onPause(){
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
swipeRefreshLayout.setEnabled(false);
|
||||||
//Store bookmark on pause
|
//Store bookmark on pause
|
||||||
if (context instanceof BaseMainActivity && type == RetrieveFeedsAsyncTask.Type.HOME) {
|
if (context instanceof BaseMainActivity && type == RetrieveFeedsAsyncTask.Type.HOME) {
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
@ -662,6 +663,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
@Override
|
@Override
|
||||||
public void onResume(){
|
public void onResume(){
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
swipeRefreshLayout.setEnabled(true);
|
||||||
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
|
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
|
||||||
if (type == RetrieveFeedsAsyncTask.Type.HOME){
|
if (type == RetrieveFeedsAsyncTask.Type.HOME){
|
||||||
if( getUserVisibleHint() ){
|
if( getUserVisibleHint() ){
|
||||||
|
|
Loading…
Reference in New Issue