Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Home screen contact shortcut stays after the contact is deleted (and keeps the old name after a rename)

オープン
#633 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, kotlin
領域
mobile

調査の方向性

Start with shortcut creation in app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt and the missing-contact handling in app/src/main/kotlin/org/fossify/contacts/activities/ViewContactActivity.kt. Trace contact save and delete flows to see where pinned shortcuts can be updated or disabled, then check existing shortcut related tests. Done means a renamed contact's shortcut shows the new name and a deleted contact's shortcut no longer opens an empty screen.

索引モデルが issue の本文から書いたものです。

説明

bug needs triage
Checklist
  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.
Affected app version

1.6.0

Affected Android/Custom ROM version

android 16

Affected device model

Xiaomi 17 promax

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug
  1. Create a contact Bob. In the contact list, long-press Bob → ⋮ → Create shortcut → Add automatically. A Bob shortcut appears on the home screen.
  2. In Contacts, open Bob → Edit, rename him to Robert and save.
  3. Go to the home screen: the shortcut is still called Bob. Tapping it opens Robert correctly.
  4. Delete Robert in Contacts (trash icon → Yes). The contact list no longer has him.
  5. Go to the home screen and tap the Bob shortcut again.
Expected behavior

Both changes are made in Contacts itself, which also created the shortcut, so the app knows about them:

  • after the delete (step 4), the shortcut is disabled or removed (Android then shows a "contact was deleted"-style message instead of opening it);
  • after the rename (step 2), the shortcut label is updated to Robert.
Actual behavior

After the delete, the Bob shortcut stays on the home screen. Tapping it opens an empty contact screen, which closes right away and returns to the launcher, without any message.
After the rename, the shortcut keeps the old label Bob (it still opens the right contact).

Screenshots/Screen recordings

No response

Additional information

The shortcut is created with the contact name at that time as label and contact.hashCode() as its id:
https://github.com/FossifyOrg/Contacts/blob/8bbc84014f776b2199136a500799c21425ff0fe8/app/src/main/kotlin/org/fossify/contacts/adapters/ContactsAdapter.kt#L317-L338

Nothing in the app calls ShortcutManager.updateShortcuts() or disableShortcuts(), so saving an edit or deleting a contact never touches the pinned shortcut. Because Contact is a data class, its hashCode() changes when the contact is edited, so the app could not find the shortcut again even if it tried. When the contact is gone, ViewContactActivity just finishes (the "unknown error" toast did not show up for me):
https://github.com/FossifyOrg/Contacts/blob/8bbc84014f776b2199136a500799c21425ff0fe8/app/src/main/kotlin/org/fossify/contacts/activities/ViewContactActivity.kt#L166-L175

Possible fix: use a stable shortcut id (e.g. the contact id), then call updateShortcuts() after saving and disableShortcuts(ids, message) after deleting a contact.

主要言語
Kotlin
スター
917
フォーク
73
平均マージ
1日 16時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FossifyOrg/Contacts のほかの issue

FossifyOrg/Contacts の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。