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

Add a contact add/remove button in chat. #120

Closed
wants to merge 1 commit into from

Conversation

theurere
Copy link
Contributor

For single chat sessions and those that are 'users' add a contact add/remove star to the chat menu next to call, upload file, and geolocation.

chat-contact

@@ -5,6 +5,8 @@
<button ng-if="!isgroupchat" class="btn btn-sm btn-primary" title="{{_('Start video call')}}" ng-click="doCall()"><i class="fa fa-phone fa-fw"></i></button>
<button class="btn btn-sm btn-primary btn-fileupload" title="{{_('Upload files')}}"><i class="fa fa-upload fa-fw"></i></button>
<button class="btn btn-sm btn-primary" title="{{_('Share my location')}}" ng-click="shareGeolocation()"><i class="fa fa-location-arrow fa-fw"></i></button>
<button ng-if="!isgroupchat && isuser && !iscontact" class="btn btn-sm btn-primary" title="{{_('Add to contacts')}}" ng-click="toggleContact()"><i class="fa fa-star-o"></i></button>
<button ng-if="!isgroupchat && isuser && iscontact" class="btn btn-sm btn-primary" title="{{_('Remove from contacts')}}" ng-click="toggleContact()"><i class="fa fa-star"></i></button>
Copy link
Contributor

Choose a reason for hiding this comment

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

The !isgroupchat && isuser condition should be combined into a single variable, e.g. canAddContact

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added canAddContact flag. This is much easier to read.

@longsleep
Copy link
Contributor

Any updates on those comments?

@theurere
Copy link
Contributor Author

See new PR based on develop branch. See #151

@theurere theurere closed this Nov 17, 2014
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