Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opening a new chat from the Folders tab #5688

Merged
merged 5 commits into from
Feb 6, 2017

Conversation

cjb
Copy link
Contributor

@cjb cjb commented Feb 6, 2017

@keybase/react-hackers

This PR adds two new buttons: A "Chat" button to each row in the main folders tab view of rows, and an "Open in chat" button inside the per-folder view.

Our startConversation() action takes a list of users (and is fine to call on an existing conversation), so we just take the TLF name from folder.sortName (e.g. cjb,chrisnojima,max) and call tlf.split(',') to get the users array.

The chat buttons are only shown on private folders, not public ones. No implementation for mobile yet.

@@ -1173,6 +1178,12 @@ function _unboxedToMessage (message: MessageUnboxed, idx: number, yourName, your
}
}

function * _openTlfInChat (action: OpenTlfInChat): SagaGenerator<any, any> {
const tlf = action.payload
const users = tlf.split(',')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use the kbfs helpers to do this

@keybase-ci-visdiff
Copy link

The commits 4931777...1a12273 introduce visual changes on linux.

🔎 3 changed

@cjb
Copy link
Contributor Author

cjb commented Feb 6, 2017

@chrisnojima Thanks, fixed that, also now checks to see whether there are any readers (e.g. chris#cjb) and doesn't show the chat links if there are.

@keybase-ci-visdiff
Copy link

The commits 4931777...9fa77c5 introduce visual changes on linux.

🔎 3 changed

Copy link
Contributor

@chrisnojima chrisnojima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasReaders might be better named as hasReadonlyUsers or something, but its fine

@keybase-ci-visdiff
Copy link

The commits 4931777...99840dc introduce visual changes on linux.

🔎 3 changed

@keybase-ci-visdiff
Copy link

The commits 4931777...f248f32 introduce visual changes on linux.

🔎 3 changed

@cjb cjb merged commit 66420b8 into master Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants