mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-03-10 09:48:33 +00:00
Display user name and user icon in each post when loading posts in specific subreddits.
This commit is contained in:
18
app/src/main/java/User/UserDao.java
Normal file
18
app/src/main/java/User/UserDao.java
Normal file
@ -0,0 +1,18 @@
|
||||
package User;
|
||||
|
||||
import android.arch.persistence.room.Dao;
|
||||
import android.arch.persistence.room.Insert;
|
||||
import android.arch.persistence.room.OnConflictStrategy;
|
||||
import android.arch.persistence.room.Query;
|
||||
|
||||
@Dao
|
||||
public interface UserDao {
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insert(User user);
|
||||
|
||||
@Query("DELETE FROM users")
|
||||
void deleteAllUsers();
|
||||
|
||||
@Query("SELECT * FROM users WHERE user_name = :userName LIMIT 1")
|
||||
User getUserData(String userName);
|
||||
}
|
||||
Reference in New Issue
Block a user