GithubHelp home page GithubHelp logo

Comments (20)

nick22985 avatar nick22985 commented on June 15, 2024 1

It not doing it now.
Closing as it seems it is not doing it now

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024 1

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.

nick22985 avatar nick22985 commented on June 15, 2024 1

lmao always the way xD

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024 1

@danivideda discord related stuff. See #20 (comment)

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024

A reproduction code? 'Cause I can't reproduce it.

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024

The only thing I haven't tested, in non-git environment. 😄

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

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.

leonardssh avatar leonardssh commented on June 15, 2024

I've found the problem, yep, it's related to the Git API. I've almost got it.

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

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

https://youtu.be/JXS4H6kEhq8

@leonardssh Can not re open issues. Unless u want me to create new ones?

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024

I'm investigating... :shipit:

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024

@nick22985 can you test it now?

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

@leonardssh When folder is not in a repo. Does not display Inactive button. Switching now is working.

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

Think i found the probelem

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

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.

leonardssh avatar leonardssh commented on June 15, 2024

Yeah, I think I need to take a look at the Data class code, get it purified.

from vscord.

nick22985 avatar nick22985 commented on June 15, 2024

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.

leonardssh avatar leonardssh commented on June 15, 2024

Yeah, that's what I noticed, something is wrong.

from vscord.

danivideda avatar danivideda commented on June 15, 2024

I was about to raise an issue where the 'View Repository' button didn't do anything.
Is this what caused it?

from vscord.

leonardssh avatar leonardssh commented on June 15, 2024

@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.

nick22985 avatar nick22985 commented on June 15, 2024

Sorry for the late response @leonardssh.
Yea the issue seems to have been Fixed.

from vscord.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.