소스 검색

fixed incompatible

flabbet 4 년 전
부모
커밋
3bd1885fd3
2개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 0
      PixiEditor.UpdateModule/UpdateChannel.cs
  2. 2 1
      PixiEditor/ViewModels/SubViewModels/Main/UpdateViewModel.cs

+ 9 - 0
PixiEditor.UpdateModule/UpdateChannel.cs

@@ -22,5 +22,14 @@ namespace PixiEditor.UpdateModule
             ApiUrl = $"https://api.github.com/repos/{repositoryOwner}/{repositoryName}/releases/latest";
             ApiUrl = $"https://api.github.com/repos/{repositoryOwner}/{repositoryName}/releases/latest";
             IncompatibleFileApiUrl = "https://raw.githubusercontent.com/" + $"{repositoryOwner}/{repositoryName}/" + "{0}/incompatible.json";
             IncompatibleFileApiUrl = "https://raw.githubusercontent.com/" + $"{repositoryOwner}/{repositoryName}/" + "{0}/incompatible.json";
         }
         }
+
+        public UpdateChannel(string name, string repositoryOwner, string repositoryName, string incompatibleFileApiUrl)
+        {
+            Name = name;
+            RepositoryOwner = repositoryOwner;
+            RepositoryName = repositoryName;
+            IncompatibleFileApiUrl = incompatibleFileApiUrl;
+            ApiUrl = $"https://api.github.com/repos/{repositoryOwner}/{repositoryName}/releases/latest";
+        }
     }
     }
 }
 }

+ 2 - 1
PixiEditor/ViewModels/SubViewModels/Main/UpdateViewModel.cs

@@ -195,7 +195,8 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         private void InitUpdateChecker()
         private void InitUpdateChecker()
         {
         {
             UpdateChannels[0] = new UpdateChannel("Release", "PixiEditor", "PixiEditor");
             UpdateChannels[0] = new UpdateChannel("Release", "PixiEditor", "PixiEditor");
-            UpdateChannels[1] = new UpdateChannel("Development", "PixiEditor", "PixiEditor-development-channel");
+            UpdateChannels[1] = new UpdateChannel("Development", "PixiEditor", "PixiEditor-development-channel",
+                "https://raw.githubusercontent.com/PixiEditor/PixiEditor/{0}/incompatible.json");
 
 
             string updateChannel = IPreferences.Current.GetPreference<string>("UpdateChannel");
             string updateChannel = IPreferences.Current.GetPreference<string>("UpdateChannel");