mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Minor code cleanups.
This commit is contained in:
@@ -121,6 +121,7 @@ public abstract class BriarActivity extends BaseActivity {
|
||||
|
||||
/**
|
||||
* Sets the transition animations.
|
||||
*
|
||||
* @param enterTransition used to move views into initial positions
|
||||
* @param exitTransition used to move views out when starting a <b>new</b> activity.
|
||||
* @param returnTransition used when window is closing, because the activity is finishing.
|
||||
@@ -169,12 +170,11 @@ public abstract class BriarActivity extends BaseActivity {
|
||||
new AlertDialog.Builder(this, R.style.BriarDialogTheme);
|
||||
b.setMessage(message);
|
||||
b.setView(R.layout.checkbox);
|
||||
b.setPositiveButton(R.string.fix,
|
||||
(dialog, which) -> {
|
||||
Intent i = getDozeWhitelistingIntent(BriarActivity.this);
|
||||
startActivityForResult(i, REQUEST_DOZE_WHITELISTING);
|
||||
dialog.dismiss();
|
||||
});
|
||||
b.setPositiveButton(R.string.fix, (dialog, which) -> {
|
||||
Intent i = getDozeWhitelistingIntent(BriarActivity.this);
|
||||
startActivityForResult(i, REQUEST_DOZE_WHITELISTING);
|
||||
dialog.dismiss();
|
||||
});
|
||||
b.setNegativeButton(R.string.cancel,
|
||||
(dialog, which) -> dialog.dismiss());
|
||||
b.setOnDismissListener(dialog -> {
|
||||
|
||||
@@ -42,8 +42,8 @@ class ConversationMessageViewHolder extends ConversationItemViewHolder {
|
||||
timeColorBubble = getColor(v.getContext(), R.color.briar_white);
|
||||
|
||||
// clone constraint sets from layout files
|
||||
textConstraints
|
||||
.clone(v.getContext(), R.layout.list_item_conversation_msg_in);
|
||||
textConstraints.clone(v.getContext(),
|
||||
R.layout.list_item_conversation_msg_in);
|
||||
imageConstraints.clone(v.getContext(),
|
||||
R.layout.list_item_conversation_msg_image);
|
||||
imageTextConstraints.clone(v.getContext(),
|
||||
|
||||
@@ -86,6 +86,7 @@ public class ImageFragment extends Fragment {
|
||||
|
||||
// Request Listener
|
||||
RequestListener<Drawable> listener = new RequestListener<Drawable>() {
|
||||
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e,
|
||||
Object model, Target<Drawable> target,
|
||||
|
||||
@@ -328,7 +328,8 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
||||
boolean blocked =
|
||||
circumventionProvider.isTorProbablyBlocked(country);
|
||||
boolean useBridges = circumventionProvider.doBridgesWork(country);
|
||||
String setting = getString(R.string.tor_network_setting_without_bridges);
|
||||
String setting =
|
||||
getString(R.string.tor_network_setting_without_bridges);
|
||||
if (blocked && useBridges) {
|
||||
setting = getString(R.string.tor_network_setting_with_bridges);
|
||||
} else if (blocked) {
|
||||
|
||||
@@ -232,7 +232,9 @@ public class EmojiTextInputView extends KeyboardAwareLinearLayout implements
|
||||
}
|
||||
|
||||
interface TextInputListener {
|
||||
|
||||
void onTextIsEmptyChanged(boolean isEmpty);
|
||||
|
||||
void onSendEvent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user