Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
920 B

2 years ago
/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
import { Message } from "../../layer";
import getPeerColorById from "../../lib/appManagers/utils/peers/getPeerColorById";
2 years ago
import ReplyContainer from "../chat/replyContainer";
export default function wrapReply(
title: Parameters<ReplyContainer['fill']>[0],
subtitle: Parameters<ReplyContainer['fill']>[1],
message?: Message.message | Message.messageService,
setColorPeerId?: PeerId
) {
2 years ago
const replyContainer = new ReplyContainer('reply');
const fillPromise = replyContainer.fill(title, subtitle, message);
if(setColorPeerId) {
const hex = getPeerColorById(setColorPeerId, false);
replyContainer.border.style.backgroundColor = hex;
replyContainer.title.style.color = hex;
}
return {container: replyContainer.container, fillPromise};
2 years ago
}