public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM7176]: pgAdmin 4 v6.5 / Windows 10 - state is not recalled on startup
Date: Thu, 31 Mar 2022 17:58:36 +0530
Message-ID: <CAJ9T6SswuFrbHAG-tnGhD64wQDdR1UAqhn+HpTBFeyV9eJu1Vg@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDfeQySOFniEWAUxgc1YNrKVy9LSasFoX=Ghhqgbt0_4TQ@mail.gmail.com>
References: <CAJ9T6SuBRm0Hg7HCddZEZxE-V9cS115xMTXDDtO6BfFZcWSUOA@mail.gmail.com>
	<CANxoLDfeQySOFniEWAUxgc1YNrKVy9LSasFoX=Ghhqgbt0_4TQ@mail.gmail.com>

Hi Akshay,

Please find the updated patch.

On Wed, Mar 30, 2022 at 3:06 PM Akshay Joshi <[email protected]>
wrote:

> Hi Pradip
>
> In this patch, you have changed the code which Nikhil has to introduce to
> fix #7035. Please verify both the issues has been fixed after your patch.
>
> On Wed, Mar 30, 2022 at 2:56 PM Pradip Parkale <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch for #7176
>> <https://redmine.postgresql.org/issues/7176;.
>>
>> --
>> Thanks & Regards,
>> Pradip Parkale
>> Software Engineer | EnterpriseDB Corporation
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM7176_v2.patch (1.6K, 3-RM7176_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index a1debd790..45df73509 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -266,7 +266,9 @@ define('pgadmin.node.server', [
                     }
                     t.addIcon(i, {icon: d.icon});
                     obj.callbacks.refresh.apply(obj, [null, i]);
-                    t.close(i);
+                    setTimeout(() => {
+                      t.toggle(i);
+                    }, 10);
                     if (pgBrowser.serverInfo && d._id in pgBrowser.serverInfo) {
                       delete pgBrowser.serverInfo[d._id];
                     }
diff --git a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
index f9c59223d..5f55a2308 100644
--- a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
+++ b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js
@@ -105,6 +105,7 @@ _.extend(pgBrowser.browserTreeState, {
     })
       .done(function() {
         self.last_state = JSON.stringify(self.current_state);
+        self.fetch_state();
       })
       .fail(function(jqx) {
         var msg = jqx.responseText;
@@ -260,7 +261,7 @@ _.extend(pgBrowser.browserTreeState, {
   },
   expand_from_previous_state: function(item) {
     let self = this,
-      treeData = this.current_state || {},
+      treeData = this.stored_state || {},
       data = item && pgBrowser.tree.itemData(item),
       treeHierarchy = pgBrowser.tree.getTreeNodeHierarchy(item);
 


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin][RM7176]: pgAdmin 4 v6.5 / Windows 10 - state is not recalled on startup
  In-Reply-To: <CAJ9T6SswuFrbHAG-tnGhD64wQDdR1UAqhn+HpTBFeyV9eJu1Vg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox