blob: af95a86a34bcb20705b1ae73f6906d7c36cb90ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.wireguard.android.viewmodel
import androidx.databinding.ObservableArrayList
import androidx.databinding.ObservableList
import com.wireguard.config.Config
class ConfigDetail {
val config: Config?
val peers: ObservableList<PeerDetail> = ObservableArrayList()
constructor(other: Config?) {
config = other
if (other != null) {
other.peers.forEach {
val detail = PeerDetail(it)
peers.add(detail)
detail.bind(this)
}
}
}
}
|