Comments (20)
It not doing it now.
Closing as it seems it is not doing it now
from vscord.
Reopening this I have re created it with the deployed version.
https://youtu.be/8K8ehSd_ig0
So it appears that non git repo projects just says idle
from vscord.
lmao always the way xD
from vscord.
@danivideda discord related stuff. See #20 (comment)
from vscord.
A reproduction code? 'Cause I can't reproduce it.
from vscord.
The only thing I haven't tested, in non-git environment. 😄
from vscord.
Another thing to note. Now if you open vscode inside with a file already open. The rpc will not display. Until changing the file. This issue might be related to something about when a git repo isnt detected it does show anything maybe?
from vscord.
I've found the problem, yep, it's related to the Git API. I've almost got it.
from vscord.
Updates now but does not clear out the repo url button. So when switching from a git repo to the non git repo it will display the button to link back to your previous repo. If you have Rpc: Button Incative label / Button inactive url set. It also does not update the values to those correct values as well / git repo never updates
@leonardssh Can not re open issues. Unless u want me to create new ones?
from vscord.
I'm investigating...
from vscord.
@nick22985 can you test it now?
from vscord.
@leonardssh When folder is not in a repo. Does not display Inactive button. Switching now is working.
from vscord.
Think i found the probelem
from vscord.
So this is the fix
Line 130 in activity.ts. The problem is that dataClass.gitRemoteUrl} needs to be changed to a asynchronous function so that it waits to see the results from the api call before returning. This way we dont run into issues with if the API has not returned the a value it going to the inactive git repo button and u having to wait until u switch files again for it to update
if (config[CONFIG_KEYS.ButtonEnabled]) {
console.log(`${dataClass.gitRemoteUrl}`);
if (dataClass.gitRemoteUrl) {
const gitRepo = dataClass.gitRemoteUrl.toString('https').replace(/\.git$/, '');
const gitOrg = dataClass.gitRemoteUrl.organization ?? dataClass.gitRemoteUrl.owner;
const isRepositoryExcluded = isExcluded(config[CONFIG_KEYS.IgnoreRepositories], gitRepo);
const isOrganizationExcluded = isExcluded(config[CONFIG_KEYS.IgnoreOrganizations], gitOrg);
const isNotExcluded = !isRepositoryExcluded && !isWorkspaceExcluded && !isOrganizationExcluded;
if (gitRepo && config[CONFIG_KEYS.ButtonActiveLabel] && isNotExcluded) {
presence = {
...presence,
buttons: [
{
label: config[CONFIG_KEYS.ButtonActiveLabel],
url: gitRepo
}
]
};
}
} else if (!dataClass.gitRemoteUrl && config[CONFIG_KEYS.ButtonInactiveLabel] && config[CONFIG_KEYS.ButtonInactiveUrl]) {
from vscord.
Yeah, I think I need to take a look at the Data class code, get it purified.
from vscord.
The other thing when i was looking around trying to fix it. It also looks like it resets the presence every time so for a second u see the idle state then it switches to the config.
from vscord.
Yeah, that's what I noticed, something is wrong.
from vscord.
I was about to raise an issue where the 'View Repository' button didn't do anything.
Is this what caused it?
from vscord.
@nick22985 the problem still persist? After the last couple updates?
@danivideda the problem seems to be solved, I think the people at discord have finally made it so you can click your own button (at least it works for me)
from vscord.
Sorry for the late response @leonardssh.
Yea the issue seems to have been Fixed.
from vscord.
Related Issues (20)
- Hide 'View Repository' button on private repositories
- Jupyter Notebook files not identified HOT 1
- 😭 Icon gruntfile is not appear HOT 1
- Show terminal tab selection HOT 1
- RTC_COULD_NOT_CONNECT HOT 1
- View Repository Button Doesn't Work HOT 9
- add separate option to controll if workspace, filename or git repo should be hidden
- Can't connect to gateway HOT 1
- Spamming "Invalid Url for Button1." HOT 1
- Couldn't connect to Discord via RPC: RPC_COULD_NOT_CONNECT
- Extension doesn't load reliably every time HOT 2
- Rights to icons? HOT 2
- Settings & Variables issues
- No RPC HOT 1
- Extension does not load at all
- A little problem on running sources
- TypeError: Invalid URL HOT 1
- VSCord cannot connect to Discord via RPC HOT 5
- Failed to reconnect to Discord Gateway Couldn't connect to Discord via RPC: RPC_COULD_NOT_CONNECT HOT 4
- Language-Specific Images (Icons) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscord.