mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 21:58:53 +01:00
Replaced anonymous classes with lambda
This commit is contained in:
+2
-9
@@ -19,7 +19,6 @@ import android.view.MenuInflater;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.melnykov.fab.FloatingActionButton;
|
import com.melnykov.fab.FloatingActionButton;
|
||||||
@@ -115,9 +114,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
|||||||
mFab.setColorPressed(ColorUtils.lighten(ThemeManager.getColor()));
|
mFab.setColorPressed(ColorUtils.lighten(ThemeManager.getColor()));
|
||||||
mFab.attachToRecyclerView(mRecyclerView);
|
mFab.attachToRecyclerView(mRecyclerView);
|
||||||
mFab.getDrawable().setColorFilter(new PorterDuffColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY));
|
mFab.getDrawable().setColorFilter(new PorterDuffColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY));
|
||||||
mFab.setOnClickListener(new View.OnClickListener() {
|
mFab.setOnClickListener(v -> {
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
// Show the compose fragment, showing the keyboard and focusing on the recipients edittext.
|
// Show the compose fragment, showing the keyboard and focusing on the recipients edittext.
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putBoolean(ComposeFragment.ARG_SHOW_KEYBOARD, true);
|
args.putBoolean(ComposeFragment.ARG_SHOW_KEYBOARD, true);
|
||||||
@@ -125,7 +122,6 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
|||||||
|
|
||||||
Fragment content = getFragmentManager().findFragmentById(R.id.content_frame);
|
Fragment content = getFragmentManager().findFragmentById(R.id.content_frame);
|
||||||
switchFragment(ComposeFragment.getInstance(args, content));
|
switchFragment(ComposeFragment.getInstance(args, content));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mViewHasLoaded = true;
|
mViewHasLoaded = true;
|
||||||
@@ -252,9 +248,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
|||||||
|
|
||||||
dialog.addMenuItem(R.string.menu_delete_conversation, MENU_DELETE_CONVERSATION);
|
dialog.addMenuItem(R.string.menu_delete_conversation, MENU_DELETE_CONVERSATION);
|
||||||
|
|
||||||
dialog.buildMenu(new AdapterView.OnItemClickListener() {
|
dialog.buildMenu((parent, view1, position, id) -> {
|
||||||
@Override
|
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
||||||
switch ((int) id) {
|
switch ((int) id) {
|
||||||
case MENU_MUTE_CONVERSATION:
|
case MENU_MUTE_CONVERSATION:
|
||||||
conversationPrefs.putBoolean(SettingsFragment.NOTIFICATIONS, false);
|
conversationPrefs.putBoolean(SettingsFragment.NOTIFICATIONS, false);
|
||||||
@@ -306,7 +300,6 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
|||||||
DialogHelper.showDeleteFailedMessagesDialog((MainActivity) mContext, threadId);
|
DialogHelper.showDeleteFailedMessagesDialog((MainActivity) mContext, threadId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}).show(mContext.getFragmentManager(), "conversation options");
|
}).show(mContext.getFragmentManager(), "conversation options");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user