Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Notifications #820

Closed
robhuska opened this issue May 30, 2017 · 8 comments
Closed

Upload Notifications #820

robhuska opened this issue May 30, 2017 · 8 comments
Assignees
Labels

Comments

@robhuska
Copy link

So, since I upgraded from 0.10.5 to 0.10.7 I started getting notifications every time I saved a compiled file. I tried turning off the setting "Enable Transfer Notifications", but that did not work. Here is what I have been seeing.

notifications

To fix this I went in to the lib/client.js file and changed lines 61-67 from this:

          watcher
          .on('change', (path) => {
            self.watch.queueUpload.apply(self, [path]);
	    atom.notifications.addInfo('Remote FTP: Change detected in: '+ path, {
	      dismissable: false,
	    });
          });

to this:

          watcher
          .on('change', (path) => {
            self.watch.queueUpload.apply(self, [path]);
            if (atom.config.get('Remote-FTP.enableTransferNotifications')) {
	      atom.notifications.addInfo('Remote FTP: Change detected in: '+ path, {
	        dismissable: false,
	      });
            }
          });

This now allows the Transfer Notifications setting to turn them off. If this was not the intent of that setting can someone let me know? And if it was, can someone else help to get this code pushed to this plugin? I am relatively new to the git pull request stuff.

I know that the developer is not actively working on this anymore, I have been following along with the other few bugs that have cropped up since Atom 1.17 was released. Thanks!

@robhuska
Copy link
Author

Ok, so I believe I actually did it right this time... I found that the setting I was messing with is not for those watch notifications. They are for something else (though they don't seem to work anyway...but that's a different issue that I am not as concerned with).

What I now did to disable this was created a new setting in the lib/config-schema.json:

  "enableWatchFileChangeNotifications":{
    "type":"boolean",
    "default":false
  }

Then in the lib/client.js I changed the if statement that I added from my last comment here to this:

          watcher
          .on('change', (path) => {
            self.watch.queueUpload.apply(self, [path]);
            if (atom.config.get('Remote-FTP.enableWatchFileChangeNotifications')) {
	      atom.notifications.addInfo('Remote FTP: Change detected in: '+ path, {
	        dismissable: false,
	      });
            }
          });

Now, could I get someones assistance to get this code pushed to the plugin?

@icetee icetee self-assigned this Jun 17, 2017
@icetee icetee added the testing label Jun 17, 2017
icetee added a commit that referenced this issue Jun 17, 2017
+ Little ES6 styles
+ Change config types
+ Fix bad version number
+ Simplify config query in attach method
+ Fix #820 issue, thanks @robhuska
@icetee
Copy link
Owner

icetee commented Jun 17, 2017

@robhuska If you have time, can you test it?
If it's okay, it can be closed.

@robhuska
Copy link
Author

Sure, I assume I need to pull the pr branch to test this?

@icetee
Copy link
Owner

icetee commented Jun 17, 2017

Yes!

git clone https://github.com/mgrenier/remote-ftp
cd remote-ftp
git fetch
git checkout pr
apm link --dev .
atom --dev

@robhuska
Copy link
Author

Yep the new watch file toggle works. I also like how you reconfigured the settings file. Just a heads up, in the pr branch you have Enable Dock Integration twice.

@icetee
Copy link
Owner

icetee commented Jun 17, 2017

I think it has to delete the old Remote-FTP configuration. (File > Config)

@robhuska
Copy link
Author

Is that something that I will need to do on my local, or is that something that you will take care of in the repo? Thanks again for integrating this, and for taking over the maintenance of this package. It was long over due for some updates! Good work @icetee.

@icetee
Copy link
Owner

icetee commented Jun 17, 2017

Yep.
Open "global" ~/.atom/config.cson in local config and delete oldschool Remote-FTP specifics settings.
Unfortunately only manual. I do not think it can be automated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants