|
|
@ -52,6 +52,7 @@ import androidx.annotation.Nullable;
|
|
|
|
import androidx.appcompat.widget.SearchView;
|
|
|
|
import androidx.appcompat.widget.SearchView;
|
|
|
|
import androidx.constraintlayout.widget.Group;
|
|
|
|
import androidx.constraintlayout.widget.Group;
|
|
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
|
|
|
|
|
|
import androidx.lifecycle.Lifecycle;
|
|
|
|
import androidx.lifecycle.LiveData;
|
|
|
|
import androidx.lifecycle.LiveData;
|
|
|
|
import androidx.lifecycle.Observer;
|
|
|
|
import androidx.lifecycle.Observer;
|
|
|
|
import androidx.paging.LivePagedListBuilder;
|
|
|
|
import androidx.paging.LivePagedListBuilder;
|
|
|
@ -682,11 +683,12 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onError(Context context, Throwable ex) {
|
|
|
|
public void onError(Context context, Throwable ex) {
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
.setMessage(Helper.formatThrowable(ex))
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
.setPositiveButton(android.R.string.cancel, null)
|
|
|
|
.setMessage(Helper.formatThrowable(ex))
|
|
|
|
.create()
|
|
|
|
.setPositiveButton(android.R.string.cancel, null)
|
|
|
|
.show();
|
|
|
|
.create()
|
|
|
|
|
|
|
|
.show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -727,11 +729,12 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onError(Context context, Throwable ex) {
|
|
|
|
public void onError(Context context, Throwable ex) {
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
.setMessage(Helper.formatThrowable(ex))
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
.setPositiveButton(android.R.string.cancel, null)
|
|
|
|
.setMessage(Helper.formatThrowable(ex))
|
|
|
|
.create()
|
|
|
|
.setPositiveButton(android.R.string.cancel, null)
|
|
|
|
.show();
|
|
|
|
.create()
|
|
|
|
|
|
|
|
.show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|