Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112025
StickerPackNameProvider.qml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
StickerPackNameProvider.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
import
'.'
as
Kazv
QtObject
{
id: provider
property
var
pack
readonly
property
var
name:
getName
(
pack
)
readonly
property
var
roomNameProvider:
Kazv
.
RoomNameProvider
{
room:
sdkVars
.
roomList
.
room
(
pack
.
roomId
)
}
function
getName
(
pack
)
{
if
(
pack
.
packName
)
{
return
pack
.
packName
;
}
if
(
pack
.
isAccountData
)
{
return
l10n
.
get
(
'sticker-picker-user-stickers'
);
}
else
if
(
pack
.
isState
)
{
const
roomName
=
pack
===
provider
.
pack
?
roomNameProvider.name
:
roomNameProvider
.
getName
(
sdkVars
.
roomList
.
room
(
pack
.
roomId
));
if
(
pack
.
stateKey
)
{
return
l10n
.
get
(
'sticker-picker-room-sticker-pack-name'
,
{
stateKey:
pack
.
stateKey
,
room:
roomName
,
});
}
else
{
return
l10n
.
get
(
'sticker-picker-room-default-sticker-pack-name'
,
{
room:
roomName
,
});
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 9:31 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38738
Default Alt Text
StickerPackNameProvider.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment