mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Added day of week placeholder
This commit is contained in:
@@ -48,12 +48,14 @@ import org.json.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.Collator;
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -211,6 +213,8 @@ public class EntityAnswer implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
text = text.replace("$weekday$", new SimpleDateFormat("EEEE").format(new Date()));
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
for (String key : prefs.getAll().keySet())
|
||||
if (key.startsWith(PREF_PLACEHOLDER)) {
|
||||
|
||||
@@ -365,6 +365,9 @@ public class FragmentAnswer extends FragmentBase {
|
||||
} else if (itemId == R.id.menu_placeholder_date) {
|
||||
onMenuPlaceholder("$date$");
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_placeholder_weekday) {
|
||||
onMenuPlaceholder("$weekday$");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
||||
Reference in New Issue
Block a user