mirror of https://github.com/M66B/FairEmail.git
Added report issue to review dialog
This commit is contained in:
parent
85b4554317
commit
b38b458666
|
@ -5502,8 +5502,21 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_review, null);
|
||||
Button btnIssue = dview.findViewById(R.id.btnIssue);
|
||||
CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
|
||||
|
||||
final Intent issue = Helper.getIntentIssue(getContext(), true);
|
||||
btnIssue.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(issue);
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
PackageManager pm = getContext().getPackageManager();
|
||||
btnIssue.setVisibility(issue.resolveActivity(pm) == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
cbNotAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
|
|
|
@ -304,7 +304,11 @@ public class Helper {
|
|||
}
|
||||
|
||||
static Intent getIntentIssue(Context context) {
|
||||
if (ActivityBilling.isPro(context)) {
|
||||
return getIntentIssue(context, ActivityBilling.isPro(context));
|
||||
}
|
||||
|
||||
static Intent getIntentIssue(Context context, boolean pro) {
|
||||
if (pro) {
|
||||
String version = BuildConfig.VERSION_NAME + "/" +
|
||||
(Helper.hasValidFingerprint(context) ? "1" : "3") +
|
||||
(BuildConfig.PLAY_STORE_RELEASE ? "p" : "") +
|
||||
|
|
|
@ -31,6 +31,18 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIssue"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/menu_issue"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvExplanation" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbNotAgain"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -39,6 +51,6 @@
|
|||
android:text="@string/title_no_ask_again"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvExplanation" />
|
||||
app:layout_constraintTop_toBottomOf="@id/btnIssue" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
Loading…
Reference in New Issue