mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Shortcut improvements
https://developer.android.com/training/sharing/receive#get-best-ranking
This commit is contained in:
parent
eb954c303a
commit
f4fde96377
1 changed files with 2 additions and 0 deletions
|
@ -103,6 +103,7 @@ class Shortcuts {
|
|||
|
||||
EntityLog.log(context, "Shortcut email=" + email);
|
||||
ShortcutInfoCompat.Builder builder = getShortcut(context, email, name, avatar);
|
||||
builder.setLongLived(true);
|
||||
builder.setRank(shortcuts.size() + 1);
|
||||
shortcuts.add(builder.build());
|
||||
}
|
||||
|
@ -264,6 +265,7 @@ class Shortcuts {
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
Person.Builder person = new Person.Builder()
|
||||
.setIcon(icon)
|
||||
.setKey(email)
|
||||
.setName(name == null ? email : name)
|
||||
.setImportant(true);
|
||||
if (avatar != null)
|
||||
|
|
Loading…
Reference in a new issue