🐛 Bug fixes and support new version of API
This commit is contained in:
@@ -65,12 +65,13 @@ final apiClientProvider = Provider<Dio>((ref) {
|
|||||||
final serverUrl = ref.watch(serverUrlProvider);
|
final serverUrl = ref.watch(serverUrlProvider);
|
||||||
final dio = Dio(
|
final dio = Dio(
|
||||||
BaseOptions(
|
BaseOptions(
|
||||||
baseUrl: serverUrl,
|
baseUrl: '$serverUrl/api',
|
||||||
connectTimeout: const Duration(seconds: 10),
|
connectTimeout: const Duration(seconds: 10),
|
||||||
receiveTimeout: const Duration(seconds: 10),
|
receiveTimeout: const Duration(seconds: 10),
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
'X-Client': 'Solian',
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@@ -28,7 +28,7 @@ class StickersScreen extends HookConsumerWidget {
|
|||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.push('/creators/stickers/new?pubName=pubName').then((
|
context.push('/creators/stickers/new?pubName=$pubName').then((
|
||||||
value,
|
value,
|
||||||
) {
|
) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
|
@@ -44,7 +44,7 @@ class AudioCallButton extends HookConsumerWidget {
|
|||||||
try {
|
try {
|
||||||
await apiClient.post('/chat/realtime/$roomId');
|
await apiClient.post('/chat/realtime/$roomId');
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
context.push('/chat/call/$roomId');
|
context.push('/chat/$roomId/call');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showErrorAlert(e);
|
showErrorAlert(e);
|
||||||
|
@@ -360,7 +360,7 @@ class CallOverlayBar extends HookConsumerWidget {
|
|||||||
).padding(all: 16),
|
).padding(all: 16),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.push('/chat/call/${callNotifier.roomId!}');
|
context.push('/chat/${callNotifier.roomId!}/call');
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user