INNER CODE UNIT · TypeScript
message
iamcco/coc-flutter · src/lib/notification/index.ts:51
const message = this.messages[this.messages.length - 1];
if (top + message.height > screenHeight) {
break;
} else {
this.messages.pop();
await message.show(top);
this.display.push(message);
top += message.height;
}
}
if (!this.messages.length && !this.display.length) return;
this.timer = setTimeout(() => {
this.detect();
}, this.timeGap);
}
show(message: string | string[], showTime: number = messageDefaultShowTime) {
const messages = typeof message === 'string' ? formatMessage(message) : message;