提交 5e8ac75d authored 作者: yueweilu's avatar yueweilu

重复请求

上级 38c0ec84
...@@ -20,7 +20,7 @@ class UserNotesDesController extends GetxController { ...@@ -20,7 +20,7 @@ class UserNotesDesController extends GetxController {
@override @override
void onReady() { void onReady() {
onRefresh(); // onRefresh();
super.onReady(); super.onReady();
} }
...@@ -85,11 +85,14 @@ class UserNotesDesController extends GetxController { ...@@ -85,11 +85,14 @@ class UserNotesDesController extends GetxController {
for(NoteModel noteModel in result){ for(NoteModel noteModel in result){
if(noteModel.noteContent!=null && noteModel.noteContent!.audio != null){ if(noteModel.noteContent!=null && noteModel.noteContent!.audio != null){
if(noteModel.noteContent!.audio!.isNotEmpty){ if(noteModel.noteContent!.audio!.isNotEmpty){
for(MediaModel? mediaModel in noteModel.noteContent!.audio!){ await Future.forEach(noteModel.noteContent!.audio!, (MediaModel? mediaModel) async {
Duration? duration = await audioPlayer.setUrl(mediaModel?.content??''); if (mediaModel != null && mediaModel.content != null) {
Duration? duration = await audioPlayer.setUrl(mediaModel.content!);
mediaModel?.duration = Tools.formatDuration(duration!); if (duration != null) {
} mediaModel.duration = Tools.formatDuration(duration);
}
}
});
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论