[backend/api] [frontend/pages] Remove specified as an option for default renote visibility
This commit is contained in:
parent
75941c2a1a
commit
0df2d49560
8 changed files with 28 additions and 1 deletions
|
@ -56,6 +56,9 @@ public class SettingsController(
|
|||
{
|
||||
var settings = await GetOrInitUserSettings();
|
||||
|
||||
if (newSettings.DefaultRenoteVisibility == NoteVisibility.Specified)
|
||||
throw GracefulException.BadRequest("Default renote visibility cannot be 'specified'");
|
||||
|
||||
settings.FilterInaccessible = newSettings.FilterInaccessible;
|
||||
settings.PrivateMode = newSettings.PrivateMode;
|
||||
settings.AlwaysMarkSensitive = newSettings.AlwaysMarkSensitive;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[Migration("20250105042933_FixupDefaultRenoteVisibility")]
|
||||
public partial class FixupDefaultRenoteVisibility : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("""UPDATE "user_settings" SET "defaultRenoteVisibility" = 'followers' WHERE "defaultRenoteVisibility" = 'specified';""");
|
||||
}b
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,7 +42,6 @@
|
|||
<option value="@NoteVisibility.Followers">@Loc["Followers"]</option>
|
||||
<option value="@NoteVisibility.Home">@Loc["Home"]</option>
|
||||
<option value="@NoteVisibility.Public">@Loc["Public"]</option>
|
||||
<option value="@NoteVisibility.Specified">@Loc["Specified"]</option>
|
||||
</InputSelect>
|
||||
</label>
|
||||
<label>
|
||||
|
|
Loading…
Add table
Reference in a new issue