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