(branch1, branch2)
| 17 | } |
| 18 | |
| 19 | comparator (branch1, branch2) { |
| 20 | const iUpdatedB1 = branch1.get('updatedBy') === me.id |
| 21 | const iUpdatedB2 = branch2.get('updatedBy') === me.id |
| 22 | if (iUpdatedB1 && !iUpdatedB2) { return -1 } |
| 23 | if (iUpdatedB2 && !iUpdatedB1) { return 1 } |
| 24 | return new Date(branch2.get('updated')).getTime() - new Date(branch1.get('updated')).getTime() |
| 25 | } |
| 26 | } |
| 27 | Branches.initClass() |
| 28 | return Branches |