code_style: move commit link parser to Models.CommitLink.Get

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-21 17:27:07 +08:00
parent 750ca8ec61
commit 06d033464d
No known key found for this signature in database
5 changed files with 47 additions and 31 deletions

View file

@ -67,7 +67,7 @@ namespace SourceGit.Views
presenter.Content = null;
return;
}
var viewTypeName = dataTypeName.Replace(".ViewModels.", ".Views.");
var viewType = Type.GetType(viewTypeName);
if (viewType == null)
@ -75,7 +75,7 @@ namespace SourceGit.Views
presenter.Content = null;
return;
}
var view = Activator.CreateInstance(viewType);
presenter.Content = view;
}