fix(recordings): open last file on android
This commit is contained in:
@@ -464,7 +464,7 @@ class EstadoRadio extends ChangeNotifier {
|
||||
);
|
||||
}
|
||||
_resultadosBusqueda = nuevaLista;
|
||||
// _buscarPaginaFiltrada actualiza offset/hayMas usando p?ginas crudas.
|
||||
// _buscarPaginaFiltrada actualiza offset/hayMas usando páginas crudas.
|
||||
_hayMasBusqueda = _hayMasBusqueda && pagina.isNotEmpty;
|
||||
} catch (_) {
|
||||
_errorController.add('No se pudieron cargar mas emisoras.');
|
||||
@@ -644,7 +644,21 @@ class EstadoRadio extends ChangeNotifier {
|
||||
|
||||
Future<bool> abrirUltimaGrabacion() async {
|
||||
final archivo = ultimaGrabacion;
|
||||
if (archivo == null || !await archivo.exists()) return false;
|
||||
if (archivo == null || !await archivo.exists()) {
|
||||
debugPrint('[PluriWave][recordings] last recording missing');
|
||||
return false;
|
||||
}
|
||||
debugPrint('[PluriWave][recordings] opening last file: ${archivo.path}');
|
||||
if (!kIsWeb && Platform.isAndroid) {
|
||||
final abierto = await _fileActionsChannel.invokeMethod<bool>(
|
||||
'openFile',
|
||||
{
|
||||
'path': archivo.path,
|
||||
'mimeType': 'audio/*',
|
||||
},
|
||||
);
|
||||
return abierto ?? false;
|
||||
}
|
||||
return launchUrl(
|
||||
Uri.file(archivo.path),
|
||||
mode: LaunchMode.externalApplication,
|
||||
|
||||
Reference in New Issue
Block a user