Somethings, idk what I made
This commit is contained in:
@@ -99,9 +99,12 @@ Future<void> BuildBridgeToServer() async {
|
||||
(await http.post(Uri.parse('http://161.97.127.136/task_tracker/bridge.php'), body: <String, String>{"username": username}));
|
||||
|
||||
Debug.LogResponse("${response.body}",src: 'bridge');
|
||||
|
||||
List<String> data = response.body.split(",");
|
||||
Debug.LogResponse('Update :\nactivities_rev=${data[0]} tasks_rev=${data[1]} cats_rev=${data[2]} projects_rev=${data[3]}');
|
||||
|
||||
bool changedOffline = offline==true;
|
||||
offline=false;
|
||||
if(changedOffline){refreshStream.add(false);}
|
||||
if (data[4].contains('<td>')) {
|
||||
List<String> ongoingData = data[4].split("<td>");
|
||||
if (!prefs.containsKey('current_activity')) {
|
||||
@@ -125,6 +128,9 @@ Future<void> BuildBridgeToServer() async {
|
||||
}
|
||||
} catch (e) {
|
||||
Debug.LogError("Error with bridge : $e");
|
||||
bool changedOffline = offline == false;
|
||||
offline=true;
|
||||
if(changedOffline){refreshStream.add(false);}
|
||||
}
|
||||
await Future.delayed(Duration(seconds: 5));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user