You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.0 KiB
53 lines
1.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using FLocal.Core;
|
|
|
|
namespace FLocal.Common.dataobjects {
|
|
public class AnonymousUserSettings : IUserSettings {
|
|
|
|
public AnonymousUserSettings() {
|
|
var allSkins = Skin.allSkins.ToArray();
|
|
this._skinId = allSkins[Util.RandomInt(0, allSkins.Length)].id;
|
|
}
|
|
|
|
public int threadsPerPage {
|
|
get {
|
|
return 40;
|
|
}
|
|
}
|
|
|
|
public int postsPerPage {
|
|
get {
|
|
return 20;
|
|
}
|
|
}
|
|
|
|
public int uploadsPerPage {
|
|
get {
|
|
return 50; //some pictures won't properly load when there are 100 pictures per page
|
|
}
|
|
}
|
|
|
|
public int usersPerPage {
|
|
get {
|
|
return 50;
|
|
}
|
|
}
|
|
|
|
private int _skinId;
|
|
public Skin skin {
|
|
get {
|
|
return Skin.LoadById(this._skinId);
|
|
}
|
|
}
|
|
|
|
public bool isPostVisible(Post post) {
|
|
if(post.poster.showPostsToUsers != User.ENUM_SHOWPOSTSTOUSERS_ALL) return false;
|
|
if(post.layer.name != PostLayer.NAME_NORMAL) return false;
|
|
return true;
|
|
}
|
|
|
|
}
|
|
}
|
|
|