[polari] js: Do not initialize backing properties in fields



commit cd6d93464c661270097e2cf3d6d24fe2bdacf995
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Feb 16 13:45:27 2022 +0100

    js: Do not initialize backing properties in fields
    
    For subclasses, instance fields are added right after super() returns.
    That is too late for GObject properties that are passed to the
    constructor, as the "initialization" overrides the previously set
    value.
    
    Part-of: <https://gitlab.gnome.org/GNOME/polari/-/merge_requests/244>

 src/chatView.js   | 3 ---
 src/mainWindow.js | 3 ---
 src/roomList.js   | 1 -
 3 files changed, 7 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 9c0c4398..06cbc6ff 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -254,9 +254,6 @@ const HoverFilterTag = GObject.registerClass({
             0.0, 1.0, 1.0),
     },
 }, class HoverFilterTag extends ButtonTag {
-    _filteredTag = null;
-    _hoverOpacity = 1.;
-
     constructor(params) {
         super(params);
 
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 6d488679..62ff4e8f 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -126,9 +126,6 @@ export default GObject.registerClass({
         'active-room-state-changed': {},
     },
 }, class MainWindow extends Gtk.ApplicationWindow {
-    _subtitle = '';
-
-    _room = null;
     _lastActiveRoom = null;
 
     _settings = new Gio.Settings({ schema_id: 'org.gnome.Polari' });
diff --git a/src/roomList.js b/src/roomList.js
index 1dbad9e0..a6644a6b 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -332,7 +332,6 @@ const RoomListHeader = GObject.registerClass({
         this._account = account;
 
         this._app = Gio.Application.get_default();
-        this._popover = null;
 
         this.connect('activate',
             () => this._popover?.popup());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]