Skip to content

Commit

Permalink
Simplify expression
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsandriesse committed Oct 5, 2020
1 parent 91a62a7 commit cd177ee
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,7 @@ object ClosedGroupsProtocol {
groupDB.updateMembers(groupID, members.map { Address.fromSerialized(it) })
}
// Notify the user
var infoType = GroupContext.Type.UPDATE
if (isUserLeaving) {
infoType = GroupContext.Type.QUIT
}
val infoType = if (isUserLeaving) GroupContext.Type.QUIT else GroupContext.Type.UPDATE
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(Recipient.from(context, Address.fromSerialized(groupID), false))
insertOutgoingInfoMessage(context, groupID, infoType, name, members, admins, threadID)
}
Expand Down

0 comments on commit cd177ee

Please sign in to comment.