Add @since 2.11 for avatarUrl and AvatarSpec (for #1721)

This commit is contained in:
Him188 2022-04-24 12:50:16 +01:00
parent 7a9769b618
commit 1d60cf57b8
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@ -13,8 +13,8 @@ import net.mamoe.mirai.utils.MiraiInternalApi
/**
* 头像的规格, [size] 单位为 px.
* @since 2.11
*/
@Suppress("unused")
public enum class AvatarSpec(@MiraiInternalApi public val size: Int) : Comparable<AvatarSpec> {
/**
* 最高压缩等级

View File

@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
* Copyright 2019-2022 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
@ -44,6 +44,7 @@ public interface ContactOrBot : CoroutineScope {
/**
* 头像下载链接.
* @param spec 头像的规格.
* @since 2.11
*/
@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("getAvatarUrl")

View File

@ -114,6 +114,7 @@ public interface Group : Contact, CoroutineScope, FileSupported, AudioSupported
/**
* 群头像下载链接.
* @param spec 头像的规格.
* @since 2.11
*/
public override fun avatarUrl(spec: AvatarSpec): String = "http://p.qlogo.cn/gh/${id}/${id}/${spec.size}"