|
|
@ -2,6 +2,7 @@ import appMessagesManager from "../../lib/appManagers/appMessagesManager"; |
|
|
|
import { PopupButton } from "."; |
|
|
|
import { PopupButton } from "."; |
|
|
|
import PopupPeer from "./peer"; |
|
|
|
import PopupPeer from "./peer"; |
|
|
|
import appPeersManager from "../../lib/appManagers/appPeersManager"; |
|
|
|
import appPeersManager from "../../lib/appManagers/appPeersManager"; |
|
|
|
|
|
|
|
import rootScope from "../../lib/rootScope"; |
|
|
|
|
|
|
|
|
|
|
|
export default class PopupPinMessage { |
|
|
|
export default class PopupPinMessage { |
|
|
|
constructor(peerId: number, mid: number, unpin?: true, onConfirm?: () => void) { |
|
|
|
constructor(peerId: number, mid: number, unpin?: true, onConfirm?: () => void) { |
|
|
@ -68,15 +69,22 @@ export default class PopupPinMessage { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
description = 'Would you like to pin this message?'; |
|
|
|
description = 'Would you like to pin this message?'; |
|
|
|
|
|
|
|
|
|
|
|
buttons.push({ |
|
|
|
if(peerId === rootScope.myId) { |
|
|
|
text: 'PIN JUST FOR ME', |
|
|
|
buttons.push({ |
|
|
|
callback: () => callback(true) |
|
|
|
text: 'PIN', |
|
|
|
}); |
|
|
|
callback: () => callback() |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
buttons.push({ |
|
|
|
|
|
|
|
text: 'PIN JUST FOR ME', |
|
|
|
|
|
|
|
callback: () => callback(true) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
buttons.push({ |
|
|
|
buttons.push({ |
|
|
|
text: 'PIN FOR ME AND ' + firstName, |
|
|
|
text: 'PIN FOR ME AND ' + firstName, |
|
|
|
callback: () => callback() |
|
|
|
callback: () => callback() |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|