parent
							
								
									a81d6468cc
								
							
						
					
					
						commit
						c3c99ba107
					
				@ -1096,12 +1096,11 @@ void msgBox(SessionID sessionId, String type, String title, String text,
 | 
				
			|||||||
          dialogManager.dismissAll();
 | 
					          dialogManager.dismissAll();
 | 
				
			||||||
        }));
 | 
					        }));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (reconnect != null &&
 | 
					  if (reconnect != null && title == "Connection Error") {
 | 
				
			||||||
      title == "Connection Error" &&
 | 
					 | 
				
			||||||
      reconnectTimeout != null) {
 | 
					 | 
				
			||||||
    // `enabled` is used to disable the dialog button once the button is clicked.
 | 
					    // `enabled` is used to disable the dialog button once the button is clicked.
 | 
				
			||||||
    final enabled = true.obs;
 | 
					    final enabled = true.obs;
 | 
				
			||||||
    final button = Obx(() => _ReconnectCountDownButton(
 | 
					    final button = reconnectTimeout != null
 | 
				
			||||||
 | 
					        ? Obx(() => _ReconnectCountDownButton(
 | 
				
			||||||
              second: reconnectTimeout,
 | 
					              second: reconnectTimeout,
 | 
				
			||||||
              onPressed: enabled.isTrue
 | 
					              onPressed: enabled.isTrue
 | 
				
			||||||
                  ? () {
 | 
					                  ? () {
 | 
				
			||||||
@ -1110,7 +1109,20 @@ void msgBox(SessionID sessionId, String type, String title, String text,
 | 
				
			|||||||
                      reconnect(dialogManager, sessionId, false);
 | 
					                      reconnect(dialogManager, sessionId, false);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                  : null,
 | 
					                  : null,
 | 
				
			||||||
        ));
 | 
					            ))
 | 
				
			||||||
 | 
					        : Obx(
 | 
				
			||||||
 | 
					            () => dialogButton(
 | 
				
			||||||
 | 
					              'Reconnect',
 | 
				
			||||||
 | 
					              isOutline: true,
 | 
				
			||||||
 | 
					              onPressed: enabled.isTrue
 | 
				
			||||||
 | 
					                  ? () {
 | 
				
			||||||
 | 
					                      // Disable the button
 | 
				
			||||||
 | 
					                      enabled.value = false;
 | 
				
			||||||
 | 
					                      reconnect(dialogManager, sessionId, false);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  : null,
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
 | 
					          );
 | 
				
			||||||
    buttons.insert(0, button);
 | 
					    buttons.insert(0, button);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (link.isNotEmpty) {
 | 
					  if (link.isNotEmpty) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user