Commit 83ae3109eb162b5f5b5c962e4f2cff738ee0f75d
fix: scroll down to msg for threads already open
mix irving committed on 3/3/2018, 10:33:29 AMParent: c335d074d98419654a6f798e8a29e7038515e226
Files changed
app/sync/goTo.js | changed |
app/sync/goTo.js | ||
---|---|---|
@@ -33,10 +33,14 @@ | ||
33 | 33 … | // currently do normalisation here only to generate normalised locationId |
34 | 34 … | api.router.async.normalise(location, (err, location) => { |
35 | 35 … | const locationId = api.app.sync.locationId(location) |
36 | 36 … | |
37 | - if (tabs.has(locationId)) { | |
37 … | + var page = tabs.get(locationId) | |
38 … | + if (page) { | |
38 | 39 … | tabs.select(locationId) |
40 … | + if (page && page.firstChild && page.firstChild.scrollDownToMessage) { | |
41 … | + page.firstChild.scrollDownToMessage(location.key) | |
42 … | + } | |
39 | 43 … | api.history.sync.push(location) |
40 | 44 … | |
41 | 45 … | return true |
42 | 46 … | } |
Built with git-ssb-web