mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-31 09:21:27 +00:00
Fix title string break up
This commit is contained in:
parent
3df47c607c
commit
7fd1849e3d
1 changed files with 16 additions and 3 deletions
|
@ -107,13 +107,26 @@ export default function Notification(props: Props) {
|
|||
|
||||
const notificationTitle = notification_parameters.device.title;
|
||||
const titleSplit = notificationTitle.split(' ');
|
||||
const title = titleSplit.map((message) => {
|
||||
let fullTitle = [' '];
|
||||
let uriIndicator;
|
||||
const title = titleSplit.map((message, index) => {
|
||||
if (channelName === message) {
|
||||
return (
|
||||
uriIndicator = (
|
||||
<UriIndicator uri={channelUrl} link />
|
||||
);
|
||||
fullTitle.push(' ');
|
||||
const resultTitle = fullTitle;
|
||||
fullTitle = [' '];
|
||||
|
||||
return [resultTitle.join(' '), uriIndicator];
|
||||
} else {
|
||||
return <LbcMessage>{__(' %message% ', { message })}</LbcMessage>;
|
||||
fullTitle.push(message);
|
||||
|
||||
if (index === (titleSplit.length - 1)) {
|
||||
return (
|
||||
<LbcMessage>{fullTitle.join(' ')}</LbcMessage>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue