Compare commits
3 commits
57885b4c5e
...
9369cf15ea
Author | SHA1 | Date | |
---|---|---|---|
9369cf15ea | |||
d6a33fb793 | |||
34caee585f |
5 changed files with 23 additions and 8 deletions
|
@ -3,10 +3,16 @@
|
||||||
public App(NavigatorService navigatorService) {
|
public App(NavigatorService navigatorService) {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
MainPage = new AppShell();
|
//MainPage = new AppShell();
|
||||||
NavigatorService = navigatorService;
|
NavigatorService = navigatorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal NavigatorService NavigatorService { get; private set; }
|
internal NavigatorService NavigatorService { get; private set; }
|
||||||
|
|
||||||
|
protected override Window CreateWindow(IActivationState? activationState) {
|
||||||
|
// always create new windows. This allows share intents to not crash on android
|
||||||
|
// (with the side effect that multiple windows are opened, which is messy but better than a crash)
|
||||||
|
return new Window(new AppShell());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,11 @@
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
MarkdownEditor Editor;
|
private MarkdownEditor Editor;
|
||||||
bool listed;
|
private bool listed;
|
||||||
string markdownValue;
|
private string markdownValue;
|
||||||
string markdownHtml;
|
|
||||||
|
private bool loading = false;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync() {
|
protected override async Task OnInitializedAsync() {
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
|
@ -47,6 +48,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Save() {
|
public async Task Save() {
|
||||||
await api.PostNowPage(State.SelectedAddressName, markdownValue, listed);
|
loading = true;
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
var result = await api.PostNowPage(State.SelectedAddressName, markdownValue, listed);
|
||||||
|
if (result != null) {
|
||||||
|
await State.RefreshNow();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
Nav.NavigateTo($"/person/{State.SelectedAddressName}#now");
|
||||||
|
}
|
||||||
|
|
||||||
|
loading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||||
using Neighbourhood.omg.lol.Models;
|
using Neighbourhood.omg.lol.Models;
|
||||||
|
|
||||||
namespace Neighbourhood.omg.lol {
|
namespace Neighbourhood.omg.lol {
|
||||||
[Activity(Theme = "@style/Maui.SplashTheme", LaunchMode = LaunchMode.SingleTop, MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
[Activity(Exported = true, Theme = "@style/Maui.SplashTheme", LaunchMode = LaunchMode.SingleTop, MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
||||||
[IntentFilter([Intent.ActionSend], Categories = [Intent.CategoryDefault], DataMimeType = "text/plain")]
|
[IntentFilter([Intent.ActionSend], Categories = [Intent.CategoryDefault], DataMimeType = "text/plain")]
|
||||||
[IntentFilter([Intent.ActionSend], Categories = [Intent.CategoryDefault], DataMimeType = "*/*")]
|
[IntentFilter([Intent.ActionSend], Categories = [Intent.CategoryDefault], DataMimeType = "*/*")]
|
||||||
public class MainActivity : MauiAppCompatActivity {
|
public class MainActivity : MauiAppCompatActivity {
|
||||||
|
|
BIN
Resources/AppIcon/icon.png
Normal file
BIN
Resources/AppIcon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -198,7 +198,6 @@ namespace Neighbourhood.omg.lol {
|
||||||
public async Task<BasicResponseData?> DeletePic(string address, string id) =>
|
public async Task<BasicResponseData?> DeletePic(string address, string id) =>
|
||||||
(await Delete<BasicResponseData>($"/address/{address}/pics/{id}"));
|
(await Delete<BasicResponseData>($"/address/{address}/pics/{id}"));
|
||||||
|
|
||||||
|
|
||||||
public async Task<PatchStatusResponseData?> PatchStatus(string address, string id, string content, string? emoji) =>
|
public async Task<PatchStatusResponseData?> PatchStatus(string address, string id, string content, string? emoji) =>
|
||||||
(await Patch<PatchStatusResponseData, PatchStatus>($"/address/{address}/statuses/", new PatchStatus { Id = id, Content = content, Emoji = emoji }));
|
(await Patch<PatchStatusResponseData, PatchStatus>($"/address/{address}/statuses/", new PatchStatus { Id = id, Content = content, Emoji = emoji }));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue