Moved blocked senders button to receive settings

pull/208/head
M66B 3 years ago
parent b63e0fd589
commit da02bbd6cf

@ -63,7 +63,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private SwitchCompat swSuggestReceived; private SwitchCompat swSuggestReceived;
private SwitchCompat swSuggestFrequently; private SwitchCompat swSuggestFrequently;
private Button btnLocalContacts; private Button btnLocalContacts;
private Button btnBlockedSenders;
private SwitchCompat swAutoIdentity; private SwitchCompat swAutoIdentity;
private SwitchCompat swSendChips; private SwitchCompat swSendChips;
private SwitchCompat swSendReminders; private SwitchCompat swSendReminders;
@ -142,7 +141,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swSuggestReceived = view.findViewById(R.id.swSuggestReceived); swSuggestReceived = view.findViewById(R.id.swSuggestReceived);
swSuggestFrequently = view.findViewById(R.id.swSuggestFrequently); swSuggestFrequently = view.findViewById(R.id.swSuggestFrequently);
btnLocalContacts = view.findViewById(R.id.btnLocalContacts); btnLocalContacts = view.findViewById(R.id.btnLocalContacts);
btnBlockedSenders = view.findViewById(R.id.btnBlockedSenders);
swAutoIdentity = view.findViewById(R.id.swAutoIdentity); swAutoIdentity = view.findViewById(R.id.swAutoIdentity);
swSendChips = view.findViewById(R.id.swSendChips); swSendChips = view.findViewById(R.id.swSendChips);
swSendReminders = view.findViewById(R.id.swSendReminders); swSendReminders = view.findViewById(R.id.swSendReminders);
@ -266,15 +264,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
} }
}); });
btnBlockedSenders.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_MANAGE_LOCAL_CONTACTS)
.putExtra("junk", true));
}
});
swAutoIdentity.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swAutoIdentity.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -34,6 +34,7 @@ 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.AdapterView;
import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.ImageButton; import android.widget.ImageButton;
@ -77,6 +78,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
private CheckBox[] cbDay; private CheckBox[] cbDay;
private TextView tvScheduleIgnore; private TextView tvScheduleIgnore;
private ImageButton ibSchedules; private ImageButton ibSchedules;
private Button btnBlockedSenders;
private SwitchCompat swQuickSyncImap; private SwitchCompat swQuickSyncImap;
private SwitchCompat swQuickSyncPop; private SwitchCompat swQuickSyncPop;
@ -155,6 +157,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
}; };
tvScheduleIgnore = view.findViewById(R.id.tvScheduleIgnore); tvScheduleIgnore = view.findViewById(R.id.tvScheduleIgnore);
ibSchedules = view.findViewById(R.id.ibSchedules); ibSchedules = view.findViewById(R.id.ibSchedules);
btnBlockedSenders = view.findViewById(R.id.btnBlockedSenders);
swQuickSyncImap = view.findViewById(R.id.swQuickSyncImap); swQuickSyncImap = view.findViewById(R.id.swQuickSyncImap);
swQuickSyncPop = view.findViewById(R.id.swQuickSyncPop); swQuickSyncPop = view.findViewById(R.id.swQuickSyncPop);
@ -309,6 +312,15 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
} }
}); });
btnBlockedSenders.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_MANAGE_LOCAL_CONTACTS)
.putExtra("junk", true));
}
});
swQuickSyncImap.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swQuickSyncImap.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

@ -195,19 +195,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" /> app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" />
<Button
android:id="@+id/btnBlockedSenders"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_report_24"
android:drawablePadding="6dp"
android:text="@string/title_blocked_senders"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnLocalContacts" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swAutoIdentity" android:id="@+id/swAutoIdentity"
android:layout_width="0dp" android:layout_width="0dp"
@ -217,7 +204,7 @@
android:text="@string/title_advanced_auto_identity" android:text="@string/title_advanced_auto_identity"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnBlockedSenders" app:layout_constraintTop_toBottomOf="@id/btnLocalContacts"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView

@ -349,6 +349,17 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDay5" /> app:layout_constraintTop_toBottomOf="@id/cbDay5" />
<eu.faircode.email.FixedImageButton
android:id="@+id/ibSchedules"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:contentDescription="@string/title_info"
android:tooltipText="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvScheduleHint"
app:srcCompat="@drawable/twotone_info_24" />
<eu.faircode.email.FixedTextView <eu.faircode.email.FixedTextView
android:id="@+id/tvScheduleIgnore" android:id="@+id/tvScheduleIgnore"
android:layout_width="0dp" android:layout_width="0dp"
@ -364,16 +375,17 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDay6" /> app:layout_constraintTop_toBottomOf="@id/cbDay6" />
<eu.faircode.email.FixedImageButton <Button
android:id="@+id/ibSchedules" android:id="@+id/btnBlockedSenders"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:contentDescription="@string/title_info" android:drawableEnd="@drawable/twotone_report_24"
android:tooltipText="@string/title_info" android:drawablePadding="6dp"
app:layout_constraintEnd_toEndOf="parent" android:text="@string/title_blocked_senders"
app:layout_constraintTop_toBottomOf="@id/tvScheduleHint" app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/twotone_info_24" /> app:layout_constraintTop_toBottomOf="@id/tvScheduleIgnore" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/grpExempted" android:id="@+id/grpExempted"

Loading…
Cancel
Save