Commit 0f478e5
authored
Back navigation to previous tab (#897)
* only store sourceTabId when tab is opened after clicking on a link
* Store sourceTabId only when tab opened from current tab
* store sourceTabId when tab opened in background from currentTab
* When back pressed, if sourceTab of current tab is different to null, navigate to that tab
* use room to nullify sourceTabId when tab deleted
* Rename method to be explicit about what sourceTab will be added.
Cleanup a isDefaultTab as it was never used in some parts of the code.
* Passing around sourceTabId from tab fragment. Adds flexibility and it's more explicit about what's happening.
* Removing isDefaultTab param from multiple methods where it was always false
* Add necessary migration to create foreign key in table tabs1 parent 408259c commit 0f478e5
File tree
14 files changed
+214
-135
lines changed- app
- schemas/com.duckduckgo.app.global.db.AppDatabase
- src
- androidTest/java/com/duckduckgo/app
- browser
- tabs
- db
- model
- main/java/com/duckduckgo/app
- browser
- global/db
- tabs/model
14 files changed
+214
-135
lines changedLines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
| |||
746 | 758 | | |
747 | 759 | | |
748 | 760 | | |
749 | | - | |
| 761 | + | |
750 | 762 | | |
751 | 763 | | |
752 | 764 | | |
Lines changed: 21 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| |||
1093 | 1095 | | |
1094 | 1096 | | |
1095 | 1097 | | |
1096 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1097 | 1101 | | |
1098 | 1102 | | |
1099 | 1103 | | |
| |||
1188 | 1192 | | |
1189 | 1193 | | |
1190 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1191 | 1199 | | |
1192 | 1200 | | |
1193 | 1201 | | |
| |||
1319 | 1327 | | |
1320 | 1328 | | |
1321 | 1329 | | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | 1330 | | |
1335 | 1331 | | |
1336 | 1332 | | |
| |||
1348 | 1344 | | |
1349 | 1345 | | |
1350 | 1346 | | |
| 1347 | + | |
1351 | 1348 | | |
1352 | 1349 | | |
1353 | 1350 | | |
| |||
1558 | 1555 | | |
1559 | 1556 | | |
1560 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1561 | 1568 | | |
1562 | 1569 | | |
1563 | 1570 | | |
| |||
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
| |||
132 | 139 | | |
133 | 140 | | |
134 | 141 | | |
135 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
138 | 154 | | |
139 | | - | |
| 155 | + | |
140 | 156 | | |
141 | | - | |
| 157 | + | |
142 | 158 | | |
143 | 159 | | |
144 | 160 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
| |||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
229 | | - | |
230 | 228 | | |
231 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
232 | 242 | | |
0 commit comments