Skip to content

Commit

Permalink
Merge branch 'bugFix'
Browse files Browse the repository at this point in the history
  • Loading branch information
TulshiDas39 committed Sep 2, 2024
2 parents e639275 + b7f479a commit 6758b20
Show file tree
Hide file tree
Showing 33 changed files with 433 additions and 610 deletions.
2 changes: 1 addition & 1 deletion common_library/src/constants/RendererEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,6 @@ export class RendererEvents{
static readonly getUserConfig = "getUserConfig";
static readonly updateUserName = "updateUserName";
static readonly updateUserEmail = "updateUserEmail";

static readonly getGraphCommits = "getGraphCommits";
}

6 changes: 2 additions & 4 deletions common_library/src/models/IBranchDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ export interface IBranchDetails{
LastCommitsByRemotes:ILastCommitByRemote[];
noDerivedCommits:boolean;
parentCommit?:ICommitInfo;
serial:number;
drawOrder:number;
y:number;
// commitWithMaxRefCount:ICommitInfo;
maxRefCount:number;
increasedHeightForDetached:number;
verticalOffset:number;
// Group uiObj;
}

export function createBranchDetailsObj(){
Expand All @@ -24,7 +22,7 @@ export function createBranchDetailsObj(){
LastCommitsByRemotes:[],
commits:[],
noDerivedCommits:false,
serial:0,
drawOrder:0,
y:0,
maxRefCount:0,
increasedHeightForDetached:0,
Expand Down
8 changes: 8 additions & 0 deletions common_library/src/models/ICommitFilter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface ICommitFilter{
fromDate?:string;
toDate?:string;
baseDate?:string;
limit?:number;
userModified:boolean;
firstItems?:boolean;
}
1 change: 0 additions & 1 deletion common_library/src/models/ICommitInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface ICommitInfo{
x:number;
isHead:boolean;
inMergingState?:boolean;
// SingleCommit UiObj;
}

export function CreateCommitInfoObj(){
Expand Down
2 changes: 1 addition & 1 deletion common_library/src/models/IRepositoryDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface IRepositoryDetails{
remotes:IRemoteInfo[];
branchTree:IBranchDetails[];
resolvedBranches:IBranchDetails[];
headCommit:ICommitInfo;
headCommit?:ICommitInfo;
mergeCommitMessages:string[];
sourceCommits:ICommitInfo[];
repoInfo:RepositoryInfo;
Expand Down
3 changes: 2 additions & 1 deletion common_library/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export * from './IActionTaken';
export * from './IStash';
export * from './IUserConfig';
export * from './ITypedConfig';
export * from './IGitConfig';
export * from './IGitConfig';
export * from './ICommitFilter';
4 changes: 2 additions & 2 deletions frontend/src/components/main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ISavedData, RendererEvents } from "common_library";
import React from "react";
import { useEffect } from "react";
import {useDispatch,shallowEqual, batch} from "react-redux";
import { DataUtils, EnumModals, FetchState, ReduxUtils, UiUtils, useMultiState } from "../../lib";
import { DataUtils, EnumModals, FetchState, GraphUtils, ReduxUtils, UiUtils, useMultiState } from "../../lib";
import { useSelectorTyped } from "../../store/rootReducer";
import { ActionModals, ActionSavedData } from "../../store/slices";
import { ActionUI, EnumHomePageTab, ILoaderInfo } from "../../store/slices/UiSlice";
Expand Down Expand Up @@ -71,7 +71,7 @@ function MainComponent(){

window.ipcRenderer.on(RendererEvents.refreshBranchPanel().channel,()=>{
dispatch(ActionUI.setSync({text:"Refreshing..."}));
dispatch(ActionUI.increamentVersion("branchPanelRefresh"));
GraphUtils.refreshGraph();
})

window.ipcRenderer.on(RendererEvents.cloneProgress,(_e,progress:number,stage:FetchState)=>{
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/modals/CheckoutBranchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { ActionModals } from "../../store";
import { useSelectorTyped } from "../../store/rootReducer";
import { AppButton } from "../common";
import { IpcUtils } from "../../lib/utils/IpcUtils";
import { ActionUI } from "../../store/slices/UiSlice";
import { FaTimes } from "react-icons/fa";
import { GitUtils } from "../../lib/utils/GitUtils";

interface IState{
options:string[];
Expand Down Expand Up @@ -85,7 +85,7 @@ function CheckoutBranchModalComponent(){
return;
const options = [state.searchText];
IpcUtils.checkout(options).then(()=>{
dispatch(ActionUI.increamentVersion("branchPanelRefresh"))
GitUtils.getStatus();
});
hideModal();
}
Expand Down
Loading

0 comments on commit 6758b20

Please sign in to comment.