source/lib/VBListPanel.js
// and if so delete the other entry

and if so delete the other entry
and if so delete the other entry
onDiscoveredDevice(details) {
    let changed = false
    if (this.deletedDeviceList.indexOf(details.serialNumber) === -1) {
      if (this.snTable.has(details.serialNumber)) {
        const snEntry = this.snTable.get(details.serialNumber)
        const updated = this.updateSnEntry(snEntry, details)
        this.snTable.set(details.serialNumber, snEntry)
        if (updated) {
          changed = true
        }
      }
      else {
        this.snTable.set(details.serialNumber, new SnEntry(details))
        changed = true
      }
      for (let snItem in this.snTable) {
        if (snItem.serialNumber !== details.serialNumber) {
          if (snItem.ipAddr === details.ipAddr) {
            this.snTable.delete(snItem)
            changed = true
            break
          }
        }
      }
      if (changed) {
        this.updateUIDevices()
        ipcRenderer.send('device-list', this.snTableToJSONString())
      }
    }
  }
onDiscoveredDevice ( details ) { let changed = false if ( this . deletedDeviceList . indexOf ( details . serialNumber ) === - 1 ) { if ( this . snTable . has ( details . serialNumber ) ) { const snEntry = this . snTable . get ( details . serialNumber ) const updated = this . updateSnEntry ( snEntry , details ) this . snTable . set ( details . serialNumber , snEntry ) if ( updated ) { changed = true } } else { this . snTable . set ( details . serialNumber , new SnEntry ( details ) ) changed = true } for ( let snItem in this . snTable ) { if ( snItem . serialNumber !== details . serialNumber ) { if ( snItem . ipAddr === details . ipAddr ) { this . snTable . delete ( snItem ) changed = true break } } } if ( changed ) { this . updateUIDevices ( ) ipcRenderer . send ( 'device-list' , this . snTableToJSONString ( ) ) } } }
and if so delete the other entry
and if so delete the other entry
// Don't include devices in the deleted devices table
 // Check whether the serial number is already in the table
 // Update an existing snTable entry
 // New serial number -- add new device
 // Check whether the ip address was previously assigned
 // to another device; if so, delete the old entry
 // Ignore the current entry
 // If the device table has changed, update the UI
 // Send an IPC to the Main Process so it can update its copy of the
 // discoveredDeviceList, which will be persisted to disk on shutdown
