picosh 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -81,19 +81,18 @@ exports.middleware = () => (next) => (action) => {
81
81
  if (PROMPT_RE.test(clean)) {
82
82
  promptActive = true;
83
83
  setWaiting(uid, true);
84
- } else if (!promptActive) {
84
+ } else if (promptActive) {
85
+ // スピナー等の実質的なデータが来たら waiting 解除
86
+ if (clean.trim().length > 0) {
87
+ promptActive = false;
88
+ setWaiting(uid, false);
89
+ }
90
+ } else {
85
91
  setWaiting(uid, false);
86
92
  }
87
93
  }, 300);
88
94
  }
89
95
 
90
- if (action.type === 'SESSION_USER_DATA') {
91
- const uid = activeUid;
92
- promptActive = false;
93
- clearTimeout(timers[uid]);
94
- setWaiting(uid, false);
95
- }
96
-
97
96
  return next(action);
98
97
  };
99
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picosh",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Hyper plugin: paste clipboard images as file paths",
5
5
  "main": "index.js",
6
6
  "license": "MIT",