Commit 4f97f50
committed
refactor: drop the Trusted Web Activity branch from the sunset dialog
Installed app users were shown "Update the app" pointing at the Play Store
instead of the new site, on the strength of a document.referrer check. That
check cannot be relied on. The android-app referrer only survives the first
navigation of a launch, and this app reloads itself for cache upgrades and after
a migration, so from the second boot onward a TWA user is indistinguishable from
a browser user and silently falls back to the browser path anyway.
The alternatives do not help. display-mode standalone survives reloads but
cannot separate a TWA from an installed PWA, and telling a PWA user to update an
app they do not have is worse than saying nothing. The user agent carries no
marker at all, since a TWA runs on Custom Tabs rather than a WebView.
So everyone now gets the same button and a plain navigation. The shipped APK
points at web.phcode.dev and lists both origins in its asset statements, so that
navigation stays chrome-less for app users. Until that build reaches a device
the old one shows a URL bar there, which is cosmetic and self correcting once
Play updates the app.
Removes the referrer check, the package and store URL constants, the update
button and its handler, the twa metrics variant and three strings. The reasoning
is left as a comment so the next reader does not reintroduce a check that does
not work.1 parent 57fbdb7 commit 4f97f50
3 files changed
Lines changed: 10 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
182 | 174 | | |
183 | 175 | | |
184 | 176 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 177 | | |
195 | 178 | | |
196 | 179 | | |
| |||
215 | 198 | | |
216 | 199 | | |
217 | 200 | | |
218 | | - | |
219 | 201 | | |
220 | 202 | | |
221 | 203 | | |
| |||
226 | 208 | | |
227 | 209 | | |
228 | 210 | | |
229 | | - | |
230 | 211 | | |
231 | 212 | | |
232 | 213 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 83 | | |
96 | 84 | | |
97 | 85 | | |
| |||
107 | 95 | | |
108 | 96 | | |
109 | 97 | | |
110 | | - | |
| 98 | + | |
111 | 99 | | |
112 | 100 | | |
113 | 101 | | |
| |||
119 | 107 | | |
120 | 108 | | |
121 | 109 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 110 | | |
126 | 111 | | |
127 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2929 | 2929 | | |
2930 | 2930 | | |
2931 | 2931 | | |
2932 | | - | |
2933 | | - | |
2934 | 2932 | | |
2935 | | - | |
2936 | 2933 | | |
2937 | 2934 | | |
2938 | 2935 | | |
| |||
0 commit comments