mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
Max 250 log
This commit is contained in:
parent
ef1b923b31
commit
7ab735eb02
@ -319,7 +319,7 @@ ApplicationWindow {
|
||||
|
||||
Slider {
|
||||
id: logLevelSlider
|
||||
value: 2
|
||||
value: 1
|
||||
anchors {
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
@ -685,6 +685,11 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function addLog(str) {
|
||||
// Remove first item once we've reached max log items
|
||||
if(logModel.count > 250) {
|
||||
logModel.remove(0)
|
||||
}
|
||||
|
||||
if(str.len != 0) {
|
||||
if(logView.flickableItem.atYEnd) {
|
||||
logModel.append({description: str})
|
||||
@ -693,6 +698,7 @@ ApplicationWindow {
|
||||
logModel.append({description: str})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setPeers(text) {
|
||||
|
Loading…
Reference in New Issue
Block a user