RemoteFile.FileInfo.resolveToFile: use FileSupport than Group

This commit is contained in:
Him188 2021-03-20 16:43:50 +08:00
parent 7f6812727a
commit 09cbc55ef6
3 changed files with 6 additions and 6 deletions

View File

@ -6061,8 +6061,8 @@ public final class net/mamoe/mirai/utils/RemoteFile$FileInfo {
public final fun getSha1 ()[B
public final fun getUploadTime ()J
public final fun getUploaderId ()J
public final fun resolveToFile (Lnet/mamoe/mirai/contact/Group;)Lnet/mamoe/mirai/utils/RemoteFile;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/Group;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/FileSupported;)Lnet/mamoe/mirai/utils/RemoteFile;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/FileSupported;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public abstract interface class net/mamoe/mirai/utils/RemoteFile$ProgressionCallback {

View File

@ -6090,8 +6090,8 @@ public final class net/mamoe/mirai/utils/RemoteFile$FileInfo {
public final fun getSha1 ()[B
public final fun getUploadTime ()J
public final fun getUploaderId ()J
public final fun resolveToFile (Lnet/mamoe/mirai/contact/Group;)Lnet/mamoe/mirai/utils/RemoteFile;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/Group;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/FileSupported;)Lnet/mamoe/mirai/utils/RemoteFile;
public final fun resolveToFile (Lnet/mamoe/mirai/contact/FileSupported;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public abstract interface class net/mamoe/mirai/utils/RemoteFile$ProgressionCallback {

View File

@ -179,8 +179,8 @@ public interface RemoteFile {
/**
* 根据 [FileInfo.id] [FileInfo.path] 获取到对应的 [RemoteFile].
*/
public suspend fun resolveToFile(group: Group): RemoteFile =
group.filesRoot.resolveById(id) ?: group.filesRoot.resolve(path)
public suspend fun resolveToFile(contact: FileSupported): RemoteFile =
contact.filesRoot.resolveById(id) ?: contact.filesRoot.resolve(path)
}
/**