Simplified review

pull/171/head
M66B 6 years ago
parent 895474940f
commit 04f827bbb7

@ -290,7 +290,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
static final String ACTION_DECRYPT = BuildConfig.APPLICATION_ID + ".DECRYPT"; static final String ACTION_DECRYPT = BuildConfig.APPLICATION_ID + ".DECRYPT";
static final String ACTION_NEW_MESSAGE = BuildConfig.APPLICATION_ID + ".NEW_MESSAGE"; static final String ACTION_NEW_MESSAGE = BuildConfig.APPLICATION_ID + ".NEW_MESSAGE";
private static final long REVIEW_ASK_DELAY = 3 * 24 * 3600 * 1000L; // milliseonds private static final long REVIEW_ASK_DELAY = 21 * 24 * 3600 * 1000L; // milliseconds
private static final List<String> DUPLICATE_ORDER = Collections.unmodifiableList(Arrays.asList( private static final List<String> DUPLICATE_ORDER = Collections.unmodifiableList(Arrays.asList(
EntityFolder.INBOX, EntityFolder.INBOX,
@ -5502,21 +5502,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_review, null); 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); 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() { cbNotAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

@ -304,11 +304,7 @@ public class Helper {
} }
static Intent getIntentIssue(Context context) { static Intent getIntentIssue(Context context) {
return getIntentIssue(context, ActivityBilling.isPro(context)); if (ActivityBilling.isPro(context)) {
}
static Intent getIntentIssue(Context context, boolean pro) {
if (pro) {
String version = BuildConfig.VERSION_NAME + "/" + String version = BuildConfig.VERSION_NAME + "/" +
(Helper.hasValidFingerprint(context) ? "1" : "3") + (Helper.hasValidFingerprint(context) ? "1" : "3") +
(BuildConfig.PLAY_STORE_RELEASE ? "p" : "") + (BuildConfig.PLAY_STORE_RELEASE ? "p" : "") +

@ -31,18 +31,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMessage" /> 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 <CheckBox
android:id="@+id/cbNotAgain" android:id="@+id/cbNotAgain"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -51,6 +39,6 @@
android:text="@string/title_no_ask_again" android:text="@string/title_no_ask_again"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnIssue" /> app:layout_constraintTop_toBottomOf="@id/tvExplanation" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
Loading…
Cancel
Save