Browse Source

close #470

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
a149d6906b
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 11
      app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java

11
app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java

@ -17,7 +17,9 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.fragment.app.Fragment;
@ -48,6 +50,7 @@ import awais.instagrabber.utils.Utils;
public class DirectMessageSettingsFragment extends Fragment implements SwipeRefreshLayout.OnRefreshListener {
private static final String TAG = "DirectMsgsSettingsFrag";
private AppCompatActivity fragmentActivity;
private RecyclerView userList;
private RecyclerView leftUserList;
private EditText titleText;
@ -88,6 +91,7 @@ public class DirectMessageSettingsFragment extends Fragment implements SwipeRefr
@Override
public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
fragmentActivity = (AppCompatActivity) requireActivity();
basicClickListener = v -> {
final Object tag = v.getTag();
if (tag instanceof ProfileModel) {
@ -153,6 +157,11 @@ public class DirectMessageSettingsFragment extends Fragment implements SwipeRefr
threadTitle = DirectMessageSettingsFragmentArgs.fromBundle(getArguments()).getTitle();
binding.swipeRefreshLayout.setEnabled(false);
final ActionBar actionBar = fragmentActivity.getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(threadTitle);
}
userList = binding.userList;
userList.setHasFixedSize(true);
userList.setLayoutManager(layoutManager);
@ -215,7 +224,7 @@ public class DirectMessageSettingsFragment extends Fragment implements SwipeRefr
class ChangeSettings extends AsyncTask<String, Void, Void> {
String action, argument;
boolean ok = false;
private String text;
private final String text;
public ChangeSettings(final String text) {
this.text = text;

Loading…
Cancel
Save