diff options
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r-- | cmd/mist/ui_lib.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index c88c4dab6..e0321f6dd 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -312,23 +312,19 @@ func (self *UiLib) ToAscii(data string) string { } /// Ethereum filter methods -func (self *UiLib) NewFilter(object map[string]interface{}) (id int) { +func (self *UiLib) NewFilter(object map[string]interface{}, view *qml.Common) (id int) { filter := qt.NewFilterFromMap(object, self.eth) filter.MessageCallback = func(messages state.Messages) { - self.win.Root().Call("invokeFilterCallback", xeth.ToJSMessages(messages), id) + view.Call("messages", xeth.ToJSMessages(messages), id) } id = self.filterManager.InstallFilter(filter) return id } -func (self *UiLib) NewFilterString(typ string) (id int) { +func (self *UiLib) NewFilterString(typ string, view *qml.Common) (id int) { filter := core.NewFilter(self.eth) filter.BlockCallback = func(block *types.Block) { - if self.win != nil && self.win.Root() != nil { - self.win.Root().Call("invokeFilterCallback", "{}", id) - } else { - fmt.Println("QML is lagging") - } + view.Call("messages", "{}", id) } id = self.filterManager.InstallFilter(filter) return id |