Skip to content

Commit

Permalink
Re-set project window title after changing projects
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed May 10, 2017
1 parent 2d5193d commit bbd00f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/sagas/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ module.exports = {
var { id } = project
const cache = new Cache(ARGS.cache, id)

yield call([cache, cache.init])
yield put(act.project.opened({ file: db.path, ...project }))

if (db.path !== ARGS.file) {
ARGS.file = db.path
window.location.hash = encodeURIComponent(JSON.stringify(ARGS))
window.history.pushState(
null, null, `#${encodeURIComponent(JSON.stringify(ARGS))}`
)
}

yield call([cache, cache.init])
yield put(act.project.opened({ file: db.path, ...project }))

yield every(action => has('search', action), search, db)
yield every(action => has('load', action), load)

Expand Down

0 comments on commit bbd00f6

Please sign in to comment.