mirror of https://github.com/M66B/FairEmail.git
Added calendar pro link
This commit is contained in:
parent
4ef4d902cd
commit
a6acc96ca8
|
@ -112,6 +112,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
private TextView tvColorPro;
|
||||
|
||||
private Button btnCalendar;
|
||||
private TextView tvCalendarPro;
|
||||
|
||||
private Button btnAdvanced;
|
||||
private CheckBox cbSynchronize;
|
||||
|
@ -230,6 +231,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
tvColorPro = view.findViewById(R.id.tvColorPro);
|
||||
|
||||
btnCalendar = view.findViewById(R.id.btnCalendar);
|
||||
tvCalendarPro = view.findViewById(R.id.tvCalendarPro);
|
||||
|
||||
btnAdvanced = view.findViewById(R.id.btnAdvanced);
|
||||
cbSynchronize = view.findViewById(R.id.cbSynchronize);
|
||||
|
@ -440,6 +442,8 @@ public class FragmentAccount extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
Helper.linkPro(tvColorPro);
|
||||
|
||||
btnCalendar.setEnabled(Helper.hasPermission(getContext(), Manifest.permission.WRITE_CALENDAR));
|
||||
btnCalendar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -454,7 +458,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
Helper.linkPro(tvColorPro);
|
||||
Helper.linkPro(tvCalendarPro);
|
||||
|
||||
btnAdvanced.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -87,6 +87,7 @@ public class FragmentPop extends FragmentBase {
|
|||
private TextView tvColorPro;
|
||||
|
||||
private Button btnCalendar;
|
||||
private TextView tvCalendarPro;
|
||||
|
||||
private CheckBox cbSynchronize;
|
||||
private CheckBox cbIgnoreSchedule;
|
||||
|
@ -161,6 +162,7 @@ public class FragmentPop extends FragmentBase {
|
|||
tvColorPro = view.findViewById(R.id.tvColorPro);
|
||||
|
||||
btnCalendar = view.findViewById(R.id.btnCalendar);
|
||||
tvCalendarPro = view.findViewById(R.id.tvCalendarPro);
|
||||
|
||||
cbSynchronize = view.findViewById(R.id.cbSynchronize);
|
||||
cbIgnoreSchedule = view.findViewById(R.id.cbIgnoreSchedule);
|
||||
|
@ -272,6 +274,8 @@ public class FragmentPop extends FragmentBase {
|
|||
}
|
||||
});
|
||||
|
||||
Helper.linkPro(tvCalendarPro);
|
||||
|
||||
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
@ -401,7 +405,6 @@ public class FragmentPop extends FragmentBase {
|
|||
String name = args.getString("name");
|
||||
String category = args.getString("category");
|
||||
Integer color = args.getInt("color");
|
||||
|
||||
String calendar = args.getString("calendar");
|
||||
|
||||
boolean synchronize = args.getBoolean("synchronize");
|
||||
|
@ -580,7 +583,6 @@ public class FragmentPop extends FragmentBase {
|
|||
account.name = name;
|
||||
account.category = category;
|
||||
account.color = color;
|
||||
|
||||
account.calendar = calendar;
|
||||
|
||||
account.synchronize = synchronize;
|
||||
|
|
|
@ -1948,8 +1948,10 @@ public class Helper {
|
|||
tv.getPaint().setUnderlineText(true);
|
||||
tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tv.getContext().startActivity(new Intent(tv.getContext(), ActivityBilling.class));
|
||||
public void onClick(View v) {
|
||||
v.getContext().startActivity(
|
||||
new Intent(v.getContext(), ActivityBilling.class)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3626,7 +3626,7 @@ public class MessageHelper {
|
|||
if ("message/rfc822".equals(local.type))
|
||||
decodeRfc822(context, local);
|
||||
|
||||
else if ("text/calendar".equals(local.type))
|
||||
else if ("text/calendar".equals(local.type) && ActivityBilling.isPro(context))
|
||||
decodeICalendar(context, local);
|
||||
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && local.isCompressed()) {
|
||||
|
|
|
@ -479,6 +479,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCalendar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCalendarPro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_pro_feature"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCalendar" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAdvanced"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
|
@ -489,7 +500,7 @@
|
|||
android:drawablePadding="6dp"
|
||||
android:text="@string/title_setup_advanced"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCalendar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCalendarPro" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSynchronize"
|
||||
|
@ -1138,7 +1149,7 @@
|
|||
android:id="@+id/grpCalendar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvCalendar,btnCalendar" />
|
||||
app:constraint_referenced_ids="tvCalendar,btnCalendar,tvCalendarPro" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpAdvanced"
|
||||
|
|
|
@ -351,6 +351,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCalendar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCalendarPro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_pro_feature"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCalendar" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbSynchronize"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -358,7 +369,7 @@
|
|||
android:layout_marginTop="12dp"
|
||||
android:text="@string/title_enabled"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCalendar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCalendarPro" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbIgnoreSchedule"
|
||||
|
@ -622,7 +633,7 @@
|
|||
android:id="@+id/grpCalendar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvCalendar,btnCalendar" />
|
||||
app:constraint_referenced_ids="tvCalendar,btnCalendar,tvCalendarPro" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpError"
|
||||
|
|
Loading…
Reference in New Issue