Skip to content

Commit

Permalink
fix clicking usernames in chat (#17569)
Browse files Browse the repository at this point in the history
  • Loading branch information
buoyad committed May 15, 2019
1 parent 7b1c6c6 commit 976ce52
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions shared/actions/tracker2.js
@@ -1,6 +1,7 @@
// @flow
import * as Tracker2Gen from './tracker2-gen'
import * as EngineGen from './engine-gen-gen'
import * as ProfileGen from './profile-gen'
import * as Saga from '../util/saga'
import * as Constants from '../constants/tracker2'
import * as RPCTypes from '../constants/types/rpc-gen'
Expand Down Expand Up @@ -186,8 +187,8 @@ const getProofSuggestions = () =>
)
.catch(e => logger.error(`Error loading proof suggestions: ${e.message}`))

const showUser = (_, action) =>
Tracker2Gen.createLoad({
const showUser = (_, action) => {
const load = Tracker2Gen.createLoad({
assertion: action.payload.username,
// with new nav we never show trackers from inside the app
forceDisplay: false,
Expand All @@ -197,6 +198,13 @@ const showUser = (_, action) =>
inTracker: action.payload.asTracker,
reason: '',
})
if (!action.payload.skipNav) {
// go to profile page
return [load, ProfileGen.createShowUserProfile({username: action.payload.username})]
} else {
return load
}
}

// if we mutated somehow reload ourselves and reget the suggestions
const refreshSelf = (state, action) =>
Expand Down

0 comments on commit 976ce52

Please sign in to comment.